Skip to content
QwryAI
Documentation
Pages

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.
TypeTriggerStarts when
ShopifyOrder createdA 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

  1. Open the Automation tab

    Go to Channels › WhatsApp › Manage and open the Automation tab. Select Add automation.

    Automation › Add automation.
  2. 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.
  3. 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.
Pick how to compare it.

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.

A rule: If its conditions match, Then send its template.
  1. Pick the template

    Under Then, select Select template and pick an approved template. Search with Search... or filter with Type.

  2. 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.

  3. 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.

The fallback covers every other order.
  1. 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.

GroupVariableConditions
Payment & moneyPayment methodis, is not, contains, does not contain
Order totalequals, does not equal, is greater than, is at least, is less than, is at most
Payment statusis, is not
Subtotalequals, does not equal, is greater than, is at least, is less than, is at most
Total discountsequals, does not equal, is greater than, is at least, is less than, is at most
Shipping priceequals, does not equal, is greater than, is at least, is less than, is at most
Currencyis, is not
Discount codeis, contains, is set, is not set
Customer & addressShipping countryis, is not
Shipping province/stateis, is not
Shipping cityis, is not, contains
Shipping postal codeis, is not, starts with
Customer tagscontains, does not contain
Customer emailis set, is not set
ProductsProduct titlecontains, does not contain
Product SKUcontains, does not contain
Product vendorcontains, does not contain
Number of productsequals, does not equal, is greater than, is at least, is less than, is at most
Total quantityequals, 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.

ValueWhat it fills in
Customer first nameThe customer's first name.
Customer full nameThe customer's full name.
Customer emailThe customer's email address.
Order numberThe order's name, such as #1001.
Order summaryOne line with the order number, items, shipping address and total.
Order totalThe total with its currency.
Payment methodThe order's gateway names. See Payment method condition.
Item countThe total quantity of items.
Discount codeThe discount code used on the order.
Shipping addressThe shipping address on one line.
Shipping cityThe shipping city.
Shipping countryThe shipping country.
Custom textThe 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

  1. Each agent connected to the store checks its active Order created automation.
  2. Rules are checked from top to bottom. The first rule whose conditions match sends its template.
  3. If no rule matches, the fallback sends, if it's on.
  4. 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:

Example conversation
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:

NameConditions{{1}}
Match cashPayment method contains cashCustomer first name
Match Example PayPayment method is Example PayCustomer first name
FallbackNoneCustom text there

What each order gets:

OrderSent byMessage starts with
Cash on Delivery (COD)Match cash"Hello Sara, …"
Example PayMatch Example Pay"Hello Sara, …"
Any other payment methodFallback"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:

  1. The automation is Active on the agent connected to the store.
  2. 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.
  3. The order has a phone number.
  4. The Send from number is connected and switched on in Channels › WhatsApp.
  5. The template is still approved in WhatsApp Manager. If it isn't, the editor shows This template is no longer approved. Select another.
  6. 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.

Next steps

Explore the documentation