Skip to main content

How to use pre-defined WooCommerce Variables in Wati

Updated this week

Summary

Wati makes it easy to personalize your WhatsApp messages using pre-defined variables from your WooCommerce store. These variables automatically pull customer and order details into your message templates, so you don’t have to fill them in manually. This article explains what these variables are, how they work, and how you can use them effectively in your automated messages.

Instructions

What are WooCommerce Variables in Wati?

WooCommerce variables in Wati are placeholders that automatically fetch customer and order information from your WooCommerce store. These variables are especially useful when creating personalized WhatsApp message templates for things like order confirmations or abandoned cart reminders.

For example, instead of manually typing a customer’s order number, you can add the variable {{order_number}} to your message template. When the message is sent, Wati will automatically replace it with the correct order number from WooCommerce.

List of available WooCommerce Variables

Here are the variables you can use in your Wati message templates:

Variable

What It Shows

shop_name

Your WooCommerce store name

abandoned_checkout_url

Direct link for the customer to complete their abandoned checkout

abandoned_checkout_url_partial_variable

Partial link for abandoned checkout (used with Wati's shortened URLs)

order_status_url

Direct link for the customer to check their order status

order_status_url_partial_variable

Partial link for order status (used with Wati's shortened URLs)

order_number

The customer’s WooCommerce order number

discount_code

Any discount code applied to the order

total_price

The total price of the customer’s order

shop_whatsapp

Your store’s WhatsApp contact number

shop_whatsapp_url

Direct link to open your store’s WhatsApp chat

name

The customer’s name

How are shortened URLs used?

Wati automatically shortens certain URLs from WooCommerce when generating customer links. This helps make the links cleaner and easier to share.

For example:

  • abandoned_checkout_url will look like : http://s.wati.io/12345

  • order_status_url will look like : http://s.wati.io/67890

These shortened links take customers directly to their specific pages on your WooCommerce store - such as their abandoned cart or order details.

What are Partial Variables?

Partial variables are used when you want to create custom buttons (Call-To-Action or CTA buttons) in your message templates. To learn more about buttons in message templates, follow our guide here.

These partial variables must be used with this URL: https://s.wati.io/ because they are specific to the shortened URL generated by Wati.

Example Usage:

 https://s.wati.io/{{abandoned_checkout_url_partial_variable}} https://s.wati.io/{{order_status_url_partial_variable}}

You cannot use your store’s domain with these partial variables.

For example, this will not work: https://yourstore.com/{{abandoned_checkout_url_partial_variable}}

What happens when customers click these links?

  • abandoned_checkout_url_partial_variable→ Takes the customer directly to their abandoned cart page so they can complete their purchase.

  • order_status_url_partial_variable→ Takes the customer to their order details page where they can review their order status, address, or other information.

Frequently Asked Questions (FAQs)

General Questions

1. What are WooCommerce variables in Wati?

WooCommerce variables in Wati are placeholders that automatically pull customer and order details from your WooCommerce store and insert them into WhatsApp message templates.

2. Why should I use WooCommerce variables in WhatsApp messages?

They help you personalize messages without manual work by automatically adding details like customer name, order number, or checkout links.

Available Variables

3. What information can I display using WooCommerce variables?

You can display store name, customer name, order number, discount code, total order price, abandoned checkout links, order status links, and your store’s WhatsApp contact details.

4. What is the difference between direct URL variables and partial variables?

Direct URL variables generate complete shortened links automatically, while partial variables are used for CTA buttons and must be combined with Wati’s shortened URL format.

Shortened URLs and Partial Variables

5. How does Wati use shortened URLs for WooCommerce links?

Wati automatically shortens WooCommerce links, such as abandoned checkout and order status URLs, to make them cleaner and easier to share with customers.

6. What are partial variables used for?

Partial variables are used when creating CTA buttons in message templates to generate dynamic links for actions like completing checkout or viewing order status.

7. Do partial variables work with my store’s domain?

No, partial variables only work with Wati’s shortened URL format and cannot be used with your store’s domain.

Message Behavior

8. What happens when a customer clicks an abandoned checkout or order status link?

The abandoned checkout link takes the customer directly to their cart to complete the purchase, while the order status link opens the order details page for review.

9. Do I need to manually set up or update these variables?

No, Wati automatically fetches and replaces the variables with the correct WooCommerce data when the message is sent.

Did this answer your question?