Recipes · R1
Order shipped → WhatsApp update with a tracking link
When your shop marks an order as shipped, send the customer an approved WhatsApp template with their tracking link.
Goal: Customers hear about their delivery on WhatsApp within seconds, without anyone on your team lifting a finger.
What starts it
Your own code or webhook
Your shop's own fulfilment webhook — Shopify fulfillments/create or WooCommerce order.completed — calls your code.
Your values
The customer's phone, from the order.
The customer's first name.
The order number your customer knows.
The carrier's tracking link.
Your approved "order shipped" template, with three body variables.
- Step 1
Make sure the customer is a contact
POSTCreate or update a contact
Creates the contact, or updates it if the phone number is already known. Safe to call on every order.
curl -X POST 'https://mcp.wa-api.cloud/v1/contacts' \ -H "Authorization: Bearer $API_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: order-#1001-contact' \ -d '{ "phone": "+15555550123", "name": "Jane", "tags": [ "shopify" ] }'Passes on: contact_id (from id)
- Step 2
Send the "order shipped" template
One idempotency key per order, so a retried webhook never sends twice.
curl -X POST 'https://mcp.wa-api.cloud/v1/messages/template' \ -H "Authorization: Bearer $API_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: order-#1001-shipped' \ -d '{ "contact_id": "{{steps.contact.contact_id}}", "template_id": "9120", "body_variables": [ "Jane", "#1001", "https://track.example.com/1001" ] }'Passes on: message_id (from message_id)
Good to know
Send caps apply (20 an hour, 100 a day, 3 per customer a day by default). For big sales, use a broadcast in the app.
A native version driven by store events arrives with the e-commerce pack.
Validated against the API spec on every build