Summary
This guide explains how to use predefined variables in the Wati Shopify app when creating automated WhatsApp template messages. These variables help personalize your messages by automatically pulling the store details, customer information, and order-related links. This article walks you through the available variables, how to use them in message templates, and specific instructions for adding dynamic URLs in buttons.
Instructions
What are Predefined Variables?
Predefined variables in the Wati Shopify app allow you to insert dynamic content into your automated WhatsApp messages. These variables automatically fetch relevant information from your Shopify store, like customer names, order numbers, tracking URLs, and more.
You can use these variables when creating template messages for:
Abandoned cart recovery
Order confirmation
Cash on Delivery (COD) confirmations or cancellations
Shipment tracking updates
Promotional messages with discount codes
List of Available Variables
Here's a list of predefined variables available in the Wati Shopify app:
| Variable Name | What It Displays | |----|----| | shop_name
| Name of your Shopify store | | abandoned_checkout_url
| Customer's unique abandoned cart URL (used in body text) | | abandoned_checkout_url_partial_variable
| Abandoned cart URL for CTA buttons | | order_status_url
| Link to Shopify order status page (used in body text) | | order_status_url_partial_variable
| Order status URL for CTA buttons | | order_number
| Customer's order number | | discount_code
| Discount code applied to order | | total_price
| Total price of the order | | tracking_url
| Shipment tracking link (used in body text) | | tracking_url_partial_variable
| Shipment tracking link for CTA buttons | | tracking_company
| Name of the shipment tracking company | | tracking_number
| Tracking number for the order | | cod_cancel_url
| COD cancellation link (used in body text) | | cod_cancel_url_partial_variable
| COD cancellation link for CTA buttons | | cod_confirm_url
| COD confirmation link (used in body text) | | cod_confirm_url_partial_variable
| COD confirmation link for CTA buttons | | first_name
| Customer's first name | | last_name
| Customer's last name | | product_image_url
| Product Image URL (for abandoned cart, order confirmation, or COD messages) | | catalog_checkout_url_partial_variable
| Catalog checkout link for CTA buttons |
How to Add Variables in Template Messages
Follow these steps to use predefined variables in your template messages:
Steps
Go to the Broadcast tab from the main menu.
Click on Template Message.
In the message body, click Add Variable.
Choose the required variable from the Shopify section.
The selected variable will be inserted into your message and replaced with real customer data when the message is sent.
Using URL Variables in the Message Body
Some variables generate a short link (like http://s.wati.io/12345
) when sent in the message body. These include:
abandoned_checkout_url
— Takes customers to their abandoned cart.order_status_url
— Takes customers to their order details page.cod_cancel_url
— Lets customers cancel their COD order.cod_confirm_url
— Lets customers confirm their COD order.
These links are automatically shortened for better readability.
Using Partial Variables for CTA Buttons
Partial variables are specially designed for adding dynamic URLs in the Call-to-Action (CTA) buttons of your template message.
Important:
Always add https://s.wati.io/
before the variable name when using it in a button URL.
Example:
https://s.wati.io/####{{abandoned_checkout_url_partial_variable}}
Available Partial Variables:
| Partial Variable | Purpose | |----|----| | abandoned_checkout_url_partial_variable
| Checkout URL for abandoned cart CTA button | | order_status_url_partial_variable
| Order status page URL for CTA button | | cod_confirm_url_partial_variable
| COD confirmation link for CTA button | | cod_cancel_url_partial_variable
| COD cancellation link for CTA button | | tracking_url_partial_variable
| Shipment tracking link for CTA button | | catalog_checkout_url_partial_variable
| Catalog checkout link for CTA button |
See the screenshot below for an example of how to apply the partial variable in a template message.
order_status_url_partial_variable
cod_confirm_url_partial_variable
cod_cancel_url_partial_variable
Best Practices
Use variables only from the Shopify section for Shopify automated messages.
Always check if the variable needs to be placed in the body text or a CTA button.
When using a partial variable in a button, prepend it with
https://s.wati.io/
.
Frequently Asked Questions (FAQs)
General Questions
1. What are predefined variables in Wati's Shopify app?
→ Predefined variables are placeholders that automatically pull customer or order-specific information from your Shopify store into your automated WhatsApp messages.
2. Where can I use predefined variables?
→ You can use predefined variables in your template message body or in CTA (Call-to-Action) buttons within the Wati Shopify app.
Available Variables
3. What kind of customer details can I display using variables?
→ You can display customer details like their first name (####{{first_name}}
), last name (####{{last_name}}
), and order details like order number (####{{order_number}}
) or total price (####{{total_price}}
).
4. Can I show order tracking information using variables?
→ Yes, you can use variables like ####{{tracking_url}}
for the tracking link, ####{{tracking_company}}
for the shipping provider name, and ####{{tracking_number}}
for the shipment number.
5. What is the difference between abandoned_checkout_url and abandoned_checkout_url_partial_variable?
→ abandoned_checkout_url
is used in the message body to provide a direct clickable link.→ abandoned_checkout_url_partial_variable
is specifically for CTA buttons and must be combined with https://s.wati.io/
to create the full link.
Using Variables in Template Messages
6. How do I add a variable to a message body?
→ While creating or editing a template message in Wati, click on Add Variable and select the appropriate variable from the Shopify section.
7. Will URL variables in the message body be automatically shortened?
→ Yes, any URL variable added to the message body (like ####{{order_status_url}}
or ####{{tracking_url}}
) will automatically be shortened when sent to the customer.
Using Variables in CTA Buttons
8. How do I use partial variables in a button link?
→ Add the partial variable in this format:https://s.wati.io/####{{partial_variable_name}}
This is required to correctly generate dynamic links in buttons.
9. Which variables are available for use in buttons?
→ The common partial variables for buttons include:
abandoned_checkout_url_partial_variable
order_status_url_partial_variable
cod_confirm_url_partial_variable
cod_cancel_url_partial_variable
tracking_url_partial_variable
catalog_checkout_url_partial_variable
Best Practices and Troubleshooting
10. What happens if I don't use https://s.wati.io/ with a partial variable in a button?
→ The button link will not generate properly, and the customer may see an incomplete or broken link.
11. Can I use both text variables and button variables in the same template?
→ Yes, it's recommended to use a mix of text variables for personalization and button variables for actions like viewing an order or tracking a shipment.
12. Do I need to shorten the URLs manually?
→ No, Wati automatically shortens URLs used in the message body. However, partial variables in buttons require you to prepend https://s.wati.io/
manually.