Send WhatsApp order messages from Shopify
Shopify Flow's Send HTTP request action can post an approved template to the Cloud API when an order is created, using the connected number's phone number id and a token stored as a Flow secret. On plans without that action, a Shopify admin webhook goes to a receiver, such as n8n, that makes the same call.
The Shopify plans on which Flow's Send HTTP request action is available.
How long Flow waits for an HTTP response before closing the connection and retrying later.
Meta requires businesses to obtain opt-in permission before messaging people on WhatsApp.
How does Shopify Flow send a WhatsApp message?
With the Send HTTP request action, which posts to any URL with headers and a body that can use Liquid variables from the trigger.
Build a workflow on the order creation trigger and add Send HTTP request. The URL is the Cloud API messages endpoint for the connected number's phone number id. Add an Authorization header whose value is Bearer followed by the number's access token, stored as a Flow secret and referenced as a secret variable. Secret values are never shown in the Flow interface and are redacted from run logs, which is where a token belongs. The body is a template message, with the customer's phone number in the to field and the order details as the template's parameters.
Flow treats a 2XX or 3XX response as success. Meta answers a valid request with the message id, so a run that succeeds means Meta accepted the message.
{
"messaging_product": "whatsapp",
"to": "<customer phone, digits only>",
"type": "template",
"template": {
"name": "order_confirmation",
"language": { "code": "en" },
"components": [{
"type": "body",
"parameters": [{ "type": "text", "text": "{{order.name}}" }]
}]
}
}Why does an order message have to be a template?
Because the store is writing first. Meta's 24 hour customer service window opens only when the customer writes to the number. An order confirmation, a shipping update or an abandoned checkout reminder is sent before that, so free text is refused and only a pre-approved template goes through.
Create the template once, in the utility category for order and shipping updates, and wait for approval before switching the workflow on. The name and language in the request body must match the approved template exactly, and the number of parameters must match its placeholders.
There is also consent. Meta requires opt-in before a business messages someone on WhatsApp: the person gave their number and agreed to receive messages from this business. A checkout checkbox that says so is the usual way to collect it, and the workflow should check it before sending.
What if the store's plan does not include Send HTTP request?
Use a Shopify admin webhook instead. Under Settings, Notifications, Webhooks, a merchant can create a webhook for an event such as order creation, in JSON, to a URL. Point it at a receiver: an n8n Webhook node, or a route in PHP, Python or Node. The receiver reads the order, checks consent, and makes the same template call to the Cloud API.
Whichever path sends, replies are the same. When the customer answers the order message, the reply lands in the WhatsApp Business app on the store's phone, because the number is on Coexistence, and the 24 hour window is now open for free text. If the number's webhook destination is set, the reply also reaches your system. The order message itself shows up in the app too, so the person answering sees what the customer is replying to.
Common mistakes
- Sending free text on order creation. The customer has not written, so Meta refuses it; it must be an approved template.
- Leaving error handling on Retry for 4XX responses. Flow can retry for up to 24 hours a request Meta will never accept.
- Putting the token in a header as plain text. Store it as a Flow secret so it stays out of the interface and logs.
Connect the store's number at easycoexistence.com, read its phone number id and token from the dashboard, and point Flow or your receiver at the Cloud API. From US$ 9 per number per month, falling to US$ 1 as you add numbers, with the first 3 days free.
Frequently asked questions
Who pays for the template messages?
Meta bills messaging directly to the business on its own WhatsApp Business Account. EasyCoexistence never marks it up.
Can the team still answer customers from the phone?
Yes. That is what Coexistence keeps: the WhatsApp Business app works on the same number the store sends from.
Does this need a Shopify app?
No. Flow's Send HTTP request, or an admin webhook to a receiver, is enough. The Cloud API is one HTTPS call.
What phone format does the to field need?
International format with the country code and digits only. Clean the checkout phone field before sending, since customers type spaces and symbols.
Keep reading
Ready to get started?
Set up WhatsApp Coexistence in minutes, not months. The app keeps working on the phone.
Start Free TrialVerified on