Fewer "where is my order" tickets
In online retail, the most repeated support question is usually about where the order is. The customer does not want to visit the site, dig up the email with the tracking number and paste it into another site. They want the update to reach them where they already are.
With the WhatsApp API connected to your order system, every relevant status change goes out on its own, and the conversation with the customer carries the delivery history. When they ask, the agent or the bot already knows what it is about.
Where status events come from
WhatsApp is the last mile. Before it, your system needs to know what happened to the order. The most common sources:
- E-commerce platform: order created, paid, invoiced and shipped, usually through an order webhook.
- Shipping gateway or label provider: drop-off and movement, by webhook or periodic polling.
- In-house fleet or partner courier: out for delivery, delivered and failed attempt, from the driver app.
Each source uses a different vocabulary. Before thinking about messages, normalize everything into a short list of internal statuses. That list decides what the customer receives, not the name each carrier gives the event.
Status-to-message map
| Internal status | Send? | Message |
|---|---|---|
| Payment approved | Yes | Order confirmed and estimated delivery |
| Being packed | No | Visible only on the order page |
| Shipped | Yes | Carrier, tracking number and tracking link |
| In transit | No | Intermediate moves do not become messages |
| Out for delivery | Yes | Arriving today, asking for someone to receive it |
| Delivered | Yes | Confirmation and a channel to report a problem |
| Failed attempt | Yes | What happened and what the customer needs to do |
| Delay or return | Yes | Honest explanation and next step |
In practice, an order without problems produces four messages. Events that require customer action take priority over purely informational ones.
Tracking link with preview
In the shipping alert, the link to the tracking page is the main part. With linkPreview, WhatsApp shows a card with title and image, which makes it clear the link is from your store and not a scam:
curl -X POST https://api.d-api.cloud/api/v1/messages/send/text \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "store-orders",
"to": "14155550123",
"text": "Your order 10492 has shipped. Track the delivery: https://store.com/tracking/10492",
"linkPreview": true
}'Prefer a tracking page on your own domain, showing the normalized status, over the carrier’s direct link. The customer recognizes the brand, and you control what appears. The preview depends on the page’s sharing meta tags, so test with a real link before switching the flow on.
Rules to avoid status spam
- Status only moves forward. If the carrier resends an old event, or sends events out of order, ignore any status earlier than the last one sent.
- One alert per status per order. Store the order and status pair before sending. The same event arriving twice does not produce a second message.
- Grouping window. If paid and shipped arrive minutes apart, wait a little and send only the most recent.
- Quiet hours. Informational events arriving overnight wait for the morning. Problems that need action can go out earlier, with common sense.
- Orders with several packages get one message summarizing all of them, not one per package.
The same queue and duplication concerns show up in any event-driven alert. The full design is in transactional notifications.
When the customer replies
Tracking messages get replies: "I will not be home", "you can leave it with the doorman", "it has not arrived yet". These messages reach your webhook as messages.received, with the number of whoever replied. Look up that number’s latest active order and send the conversation to support with the order and status attached. Simple questions about where the delivery is can be answered automatically with the latest normalized status and the tracking link.
After delivery
The delivered alert is the best moment to ask how the purchase went, an hour or two later, with a single question. See how to build that step in NPS surveys on WhatsApp. Larger stores, with several numbers and channels, will find more context in WhatsApp API for e-commerce. If the alerts come from an internal logistics system or ERP, also see WhatsApp API for internal operations. To test the status map with real orders, there is a 3-day free trial, no credit card.
