Integrations
WhatsApp Automations
Send customers an approved WhatsApp template automatically when something happens in another tool, such as a new Shopify order. Choose who gets which message with rules, conditions and a fallback.
QwryAI WhatsApp Automations send a customer an approved WhatsApp message template automatically when something happens in a tool your agent is connected to, such as a new order in your Shopify store. They're for stores that want order messages on WhatsApp without sending them by hand. For example, a store can confirm every cash-on-delivery order on WhatsApp as soon as it's placed.
Each automation picks the right template for the order with rules. Rules are checked from top to bottom, and the first one whose conditions match sends its template. An optional fallback template covers orders that no rule matches.
WhatsApp automation types and triggers
Every automation has a type and a trigger:
- The type is the tool the event comes from.
- The trigger is the event in that tool that starts the automation.
| Type | Trigger | Starts when |
|---|---|---|
| Shopify | Order created | A customer places an order in your Shopify store. |
An agent can have one automation per trigger. Once it has an Order created automation, Add automation is disabled, and you change that automation instead of adding another.
Before you create a WhatsApp automation
- Connect Shopify to your agent. See Shopify. Until it's connected, the Automation tab shows Connect Shopify to get started.
- Connect a WhatsApp number to the same agent. See WhatsApp. The automation sends from this number.
- Create and get approval for the templates you want to send, in the WhatsApp Business account of that number. See WhatsApp Templates. Only approved templates can be picked.
- Make sure orders have a phone number. The message goes to the phone on the shipping address, then the billing address, then the customer, then the order. Orders without a phone number get no message.
Create a WhatsApp automation
- Open the Automation tab
Go to Channels › WhatsApp › Manage and open the Automation tab. Select Add automation.
Automation › Add automation. - Check the type and trigger, and choose the number
The editor opens as New automation, with Type set to Shopify and Trigger set to Order created. Under Phone number, choose the WhatsApp number the messages come from in Send from.
Type, trigger and Send from. - Add a rule and its conditions
Under Match & send, give the first rule a Rule name that says what it matches, such as Match cash. Then add its conditions. For each one, pick an order field in Variable, an operator in Condition, and type or pick a Value.
Pick an order field.
Choose Match all when every condition must be true, or Match any when one is enough. Select Add condition for more. See Conditions for every field and operator.
- Pick the template
Under Then, select Select template and pick an approved template. Search with Search... or filter with Type.
- Fill in the template's variables
For each variable in the template, such as
{{1}}, choose the order field that fills it, or Custom text to type a fixed value. See Template variables.The WhatsApp preview on the right shows the message of the rule you're working on, with your choices filled in.
- Add more rules and a fallback (optional)
Select Add rule for more cases, and drag a rule by its handle to change the order. The top-most rule that matches wins.
Add rule, then drag to reorder.
To send something when no rule matches, turn on Send a fallback message, then pick its template and fill in its variables.
- Save & enable
Select Save & enable. QwryAI shows Automation saved, turns the automation on, and takes you back to the list. It sends on the next order.
WhatsApp automation conditions
Conditions compare a field of the new Shopify order with the value you enter.
| Group | Variable | Conditions |
|---|---|---|
| Payment & money | Payment method | is, is not, contains, does not contain |
| Order total | equals, does not equal, is greater than, is at least, is less than, is at most | |
| Payment status | is, is not | |
| Subtotal | equals, does not equal, is greater than, is at least, is less than, is at most | |
| Total discounts | equals, does not equal, is greater than, is at least, is less than, is at most | |
| Shipping price | equals, does not equal, is greater than, is at least, is less than, is at most | |
| Currency | is, is not | |
| Discount code | is, contains, is set, is not set | |
| Customer & address | Shipping country | is, is not |
| Shipping province/state | is, is not | |
| Shipping city | is, is not, contains | |
| Shipping postal code | is, is not, starts with | |
| Customer tags | contains, does not contain | |
| Customer email | is set, is not set | |
| Products | Product title | contains, does not contain |
| Product SKU | contains, does not contain | |
| Product vendor | contains, does not contain | |
| Number of products | equals, does not equal, is greater than, is at least, is less than, is at most | |
| Total quantity | equals, does not equal, is greater than, is at least, is less than, is at most | |
| Total weight (g) | equals, does not equal, is greater than, is at least, is less than, is at most |
How values are entered:
- Numbers must be numbers: Enter a number.
- Payment status is picked from a list: Pending, Authorized, Partially paid, Paid, Partially refunded, Refunded, Voided.
- Shipping country is picked from the country list. Currency is a three-letter code such as
USD. - is set and is not set need no value.
Payment method condition
Payment method matches the gateway name Shopify stores on the order, as plain text.
For a manual payment method, the gateway name is the method's name in Shopify admin under Settings › Payments › Manual payment methods, such as Cash on Delivery (COD).
Other gateways can store a different name from the one your checkout shows. Shopify's test gateway, for example, is stored as bogus. To see the gateway of an order, open the order in Shopify and expand the payment line in its Timeline.
WhatsApp automation template variables
The automation fills each variable in a template from the Shopify order, or from text you type.
| Value | What it fills in |
|---|---|
| Customer first name | The customer's first name. |
| Customer full name | The customer's full name. |
| Customer email | The customer's email address. |
| Order number | The order's name, such as #1001. |
| Order summary | One line with the order number, items, shipping address and total. |
| Order total | The total with its currency. |
| Payment method | The order's gateway names. See Payment method condition. |
| Item count | The total quantity of items. |
| Discount code | The discount code used on the order. |
| Shipping address | The shipping address on one line. |
| Shipping city | The shipping city. |
| Shipping country | The shipping country. |
| Custom text | The text you type, the same for every order. Up to 255 characters. |
WhatsApp doesn't allow line breaks inside a variable, so each value is a single line.
If the order has no value for a variable, such as a guest checkout without a first name, the variable is filled with - and the message still sends. Use Custom text for a friendlier fixed value.
What a WhatsApp automation does when a Shopify order comes in
- Each agent connected to the store checks its active Order created automation.
- Rules are checked from top to bottom. The first rule whose conditions match sends its template.
- If no rule matches, the fallback sends, if it's on.
- The message goes to the order's phone number and is added to that customer's WhatsApp conversation in the Inbox. Each order gets at most one message per agent, even if Shopify reports it twice.
Manage your WhatsApp automations
The Automation tab lists each automation with its trigger, when it was last updated, and whether it's Active. Use Category to show one type.
When every trigger already has an automation, Add automation is disabled. Hover over it to see why: Each trigger can have one automation. Edit the existing one instead.
Edit or pause an automation
Select an automation to edit it. Each rule has a button to expand or collapse it. Use the Active switch next to Save to turn the automation off or back on, then select Save.
Delete an automation
Open the ⋯ menu on an automation and choose Delete. In Delete automation?, confirm. Deleting can't be undone.
Limits
- One automation per trigger for each agent.
- Up to 25 rules per automation and 10 conditions per rule.
- Up to 50 variables in a template body.
- Rule names, condition values and custom text can be up to 255 characters.
Example: confirm cash on delivery and Example Pay orders on WhatsApp
A store offers two manual payment methods, Cash on Delivery (COD) and Example Pay. It wants every order paid with either one confirmed on WhatsApp.
It uses one approved template, order\_confirm:
Hello {{1}},
We received your order {{2}}. We'll send you a status update once your payment is approved.
Thank you for shopping with us!The automation has two rules and a fallback, all with this template and {{2}} = Order number:
| Name | Conditions | {{1}} |
|---|---|---|
| Match cash | Payment method contains cash | Customer first name |
| Match Example Pay | Payment method is Example Pay | Customer first name |
| Fallback | None | Custom text there |
What each order gets:
| Order | Sent by | Message starts with |
|---|---|---|
| Cash on Delivery (COD) | Match cash | "Hello Sara, …" |
| Example Pay | Match Example Pay | "Hello Sara, …" |
| Any other payment method | Fallback | "Hello there, …" |
The fallback sends to every order no rule matches. To message only cash and Example Pay orders, turn the fallback off.
Troubleshooting
Why didn't a customer get a WhatsApp message for their Shopify order?
Check, in order:
- The automation is Active on the agent connected to the store.
- A rule's conditions match the order, or the fallback is on. For Payment method, compare your value with the order's gateway name. See Payment method condition.
- The order has a phone number.
- The Send from number is connected and switched on in Channels › WhatsApp.
- The template is still approved in WhatsApp Manager. If it isn't, the editor shows This template is no longer approved. Select another.
- The template's variables haven't changed since you saved. If they have, open the automation and fill them in again.
Why did my automation send the wrong template?
Rules are checked from top to bottom, and the first match wins. Drag the more specific rule above the general one.
Why is my template missing from the template picker?
Select template lists only approved templates of the number in Send from. Check the template's status in WhatsApp Manager, or pick the number it belongs to.
Frequently asked questions
Can a WhatsApp automation message every new Shopify order, with no conditions?
Yes. Turn on the fallback and add no rules. The fallback then sends on every order.
What kind of messages do WhatsApp automations send?
Approved WhatsApp templates. WhatsApp requires businesses to start a conversation with an approved template, so every automation message uses one.
Does a new WhatsApp automation start sending right away?
Yes. Save & enable saves it already active. To pause it, open it, turn off Active and select Save.
Who pays for automation messages?
Meta bills each template message to your WhatsApp Business account at its own rates.
Where can I see the messages a WhatsApp automation sent?
In the Inbox. Each message is added to the customer's WhatsApp conversation, so you see it alongside any replies, and your agent answers when the customer writes back.