Skip to main content
WhatsApp Automations send a customer an approved WhatsApp message template automatically when something happens in a tool your AI agent is connected to. For example, a store can confirm every new order on WhatsApp, ask cash-on-delivery customers to confirm before shipping, or send a different message to customers in another country. 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.

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 inside that tool that starts the automation.
Shopify is the only type for now, and it has one trigger, Order created. More types and triggers will appear in the same place as they’re added. An AI 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 start

  • Connect Shopify to your AI agent. See Shopify.
  • Connect a WhatsApp number to the same AI 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 number on the order, its customer, or its shipping or billing address, in that order. Orders without a valid phone number are skipped.

Create an automation

1

Open the Automation tab

Go to Channels → WhatsApp and open the Automation tab. Click Add automation.
The WhatsApp page's Automation tab with the Create your first automation empty state and an Add automation button
2

Check the type and trigger, and choose the phone number

The editor opens with Type set to Shopify and Trigger set to Order created. Under Phone number, choose the WhatsApp number the messages are sent from in Send from.
New automation editor showing Type Shopify, Trigger Order created and the Send from phone number
3

Add a rule and its conditions

Under Match & send, give the first rule a name that says what it matches, such as Match cash. Then add its conditions. For each condition, pick an order field in Variable, an operator in Condition, and type or pick a Value.
The Variable dropdown open, listing order fields grouped under Payment & money, Customer & address and Products
Choose Match all when every condition has to be true, or Match any when one is enough. Click Add condition for more. See Conditions for every field and operator.
A rule named Match cash with one condition: Payment method contains cash
4

Pick the template

Under Then, click Select template and pick an approved template.
The Select template dialog listing approved WhatsApp templates
Automations fill variables in the template’s body only. If a template has variables in its header, the automation can’t fill them, so pick a template whose header has no variables.
5

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.
A template variable's dropdown open, listing order fields and Custom text
The Order Confirm template with {{1}} set to Customer first name and {{2}} set to Order number
The WhatsApp preview on the right shows the message with your choices filled in.
The WhatsApp preview showing Hello [Customer first name], We received your order [Order number]
6

Add more rules and a fallback (optional)

Click Add rule for more cases, and drag rules to change their order. The top-most rule that matches wins.To send something when no rule matches, turn on Send a fallback message, then pick its template and fill in its variables.
The fallback turned on with the Order Confirm template, {{1}} set to Custom text there and {{2}} set to Order number
Each template has an eye button next to its Preview. Click it to show that template in the WhatsApp preview. Without it, the preview shows the top-most rule’s template.
The WhatsApp preview showing Hello there after clicking the fallback's eye button
An automation needs at least one rule or the fallback.
7

Save & enable

Click Save & enable. The automation is saved, turned on, and you’re taken back to the list. It sends on the next order that comes in.
The Automation tab listing the Order created automation as Active

Conditions

Conditions compare a field of the new order with the value you enter. How values are compared:
  • Text ignores upper and lower case and spaces around the value.
  • Lists (customer tags, discount codes, product titles, SKUs and vendors) match contains when any item contains your text, and does not contain when no item does.
  • Numbers never match when the order has no value for that field.
  • 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 currency code such as USD.
  • Shipping province/state matches either the name or the code, such as California or CA.

Payment method

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 as it appears in Shopify admin under Settings → Payments → Manual payment methods, such as Cash on Delivery (COD) or Example Pay.
Shopify admin Payments settings, Manual payment methods: Cash on Delivery (COD) and Example Pay, both Active
Other gateways can store a different name from the one your checkout and admin show. Shopify’s test gateway, for example, shows as “(for testing) Bogus Gateway” on the order, but its gateway name is bogus. To see the gateway of an order, open the order and, in its Timeline, expand the payment line.
A Shopify order timeline with the payment expanded, showing Gateway (for testing) Bogus Gateway
Use contains with a short, distinctive word from the name, such as cash or bogus, when you’re not sure of the exact name. Use is when you know it, such as Example Pay.

Template variables

Each variable in a template is filled from the order, or from text you type. You can pick Customer first name, Customer full name, Customer email, Order number, Order summary, Order total, Payment method, Item count, Discount code, Shipping address, Shipping city, Shipping country or Custom text. These need a word of explanation: If a rule matches but the order has no value for one of its variables, such as a guest checkout without a first name, that rule is skipped and the next rule is checked. The fallback is skipped the same way. To always send something, use Custom text or a field every order has.

What happens when an order comes in

  1. Each AI agent connected to the store checks its active Order created automation.
  2. Rules are checked from top to bottom. The first rule that matches and can fill all its variables sends its template.
  3. If no rule sends, the fallback sends, if it’s on and can fill its variables.
  4. The message goes to the phone number on the order. Each order gets at most one message per AI agent, even if Shopify sends the same order twice.

Manage your automations

The Automation tab lists each automation with its type, its trigger, when it was last updated and whether it’s Active. Use Category to show only one type.
The Category filter open with All and Shopify
When every trigger already has an automation, Add automation is disabled. Hover over it to see why.
A tooltip on the disabled Add automation button: Each trigger can have one automation. Edit the existing one instead.

Edit, turn off or on

Click an automation to edit it. Its saved rules start collapsed and show their names; click a rule to expand it.
Match & send with two collapsed rules: Match cash and Match Example Pay
Use the Active switch next to Save changes to turn the automation off or back on, then click Save changes. You stay on the page after saving. Save changes stays disabled until you change something.
Edit automation header with the Active switch turned on next to the Save changes button

Delete

Open the ⋯ menu on an automation and choose Delete, then confirm. Deleting can’t be undone.
The automation's menu open with Delete
Disconnecting Shopify from your AI agent deletes its Shopify automations.

Limits

  • One automation per trigger for each AI 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

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, greeting the customer by first name when the order has one. It uses one approved template, order_confirm:
The automation has two rules and a fallback, all with this template and {{2}} = Order number: What each order gets: The fallback sends to every order no rule sends to. To message only cash and Example Pay orders, turn the fallback off and add a copy of each rule with {{1}} = Custom text there below the original.

Troubleshooting

Check, in order:
  1. The automation is Active on the AI 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.
  3. The order has a value for every variable the matching template uses. A missing value skips that rule or the fallback.
  4. The order has a valid phone number.
  5. The template is still approved in WhatsApp Manager, and its header has no variables.
Rules are checked from top to bottom and the first match wins. Drag the more specific rule above the general one.
Only approved templates of the WhatsApp number in Send from are listed. Check its status in WhatsApp Manager, or pick the number the template belongs to.

Frequently asked questions

Yes. Turn on the fallback and leave out the rules. The fallback then sends on every order.
No. WhatsApp only lets businesses start a conversation with an approved template, so every automation message is a template.
Yes. Save & enable creates it already active. To pause it, open it, turn off Active and save.
They’re deleted. After reconnecting, create them again.

Next steps

WhatsApp Templates

Create and get approval for the templates your automations send.