Order & Shipping Notifications via WhatsApp
Overview
WhatsApp notifications outperform email and SMS for transactional messages. WhatsApp messages have 98% open rates (vs. 20% for email) and support rich content like images, PDFs, buttons, and tracking links — all within the messaging app your customers already use.
Use Meta's utility templates to send order confirmations, shipping updates, delivery notifications, and return confirmations without needing opt-in for each message type.
Template Types for E-Commerce
| Template | Trigger | Category | Content |
|---|---|---|---|
order_confirmed | After payment | Utility | Order number, items, total, ETA |
order_shipped | Carrier pickup | Utility | Tracking number, carrier, link |
order_delivered | Delivery confirmed | Utility | Confirmation + review CTA |
return_initiated | Return request | Utility | Return label, instructions |
Step 1 — Order Confirmation
Template body example
Hi 1, Your order #2 has been confirmed! Items: 3 Total: 4 Estimated delivery: 5 Track your order below.
Send via API
await fetch('https://didfarm.com/api/v1/whatsapp/messages', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
account_id: 1,
to: customer.phone,
type: 'template',
template: {
name: 'order_confirmed',
language: { code: 'en' },
components: [{
type: 'body',
parameters: [
{ type: 'text', text: customer.firstName },
{ type: 'text', text: order.number },
{ type: 'text', text: order.itemsSummary },
{ type: 'text', text: `EUR ${order.total}` },
{ type: 'text', text: order.estimatedDelivery },
]
}, {
type: 'button',
sub_type: 'url',
index: 0,
parameters: [{ type: 'text', text: order.trackingUrl }]
}]
}
}),
});Step 2 — Shipping Update
Your order #1 is on its way! Carrier: 2 Tracking: 3 Tap below to track your package.
await fetch('https://didfarm.com/api/v1/whatsapp/messages', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
account_id: 1,
to: customer.phone,
type: 'template',
template: {
name: 'order_shipped',
language: { code: 'en' },
components: [{
type: 'body',
parameters: [
{ type: 'text', text: order.number },
{ type: 'text', text: shipment.carrier },
{ type: 'text', text: shipment.trackingNumber },
]
}, {
type: 'button',
sub_type: 'url',
index: 0,
parameters: [{ type: 'text', text: shipment.trackingUrl }]
}]
}
}),
});Step 3 — Delivery Notification
Hi 1, your order #2 has been delivered! We hope you love it. Tap below to leave a review.
Rich Media Messages
WhatsApp templates support rich media headers. You can attach:
- Images — product photos, order summary graphics
- Documents — invoices, return labels (PDF)
- Videos — product demos, unboxing guides
components: [{
type: 'header',
parameters: [{
type: 'image',
image: {
link: 'https://yourstore.com/images/order-12345-summary.png'
}
}]
}, {
type: 'body',
parameters: [
{ type: 'text', text: 'John' },
{ type: 'text', text: 'ORD-12345' },
]
}]Delivery Webhooks
Track the delivery status of each notification by setting up a webhook. DIDfarm forwards Meta's status updates to your endpoint.
{
"event": "whatsapp.status",
"message_id": "wamid.abc123",
"status": "delivered", // sent | delivered | read | failed
"timestamp": "2026-04-06T10:30:00Z",
"recipient": "+31611398058",
"errors": null
}app.post('/webhooks/whatsapp-status', (req, res) => {
const { message_id, status, recipient } = req.body;
if (status === 'delivered') {
console.log(`Message ${message_id} delivered to ${recipient}`);
// Update order record with delivery confirmation
}
if (status === 'failed') {
console.log(`Message ${message_id} failed, falling back to SMS`);
// Send SMS fallback
}
res.sendStatus(200);
});Best Practices
- Send order confirmation immediately after payment — don't wait for processing
- Keep messages concise — include only essential info (order number, ETA, tracking)
- Use URL buttons for tracking links instead of embedding URLs in the body
- Include an image header with product photos for higher engagement
- Set up SMS fallback for customers who don't have WhatsApp
- Respect quiet hours — don't send delivery notifications at 3 AM
- Use the same WhatsApp number for all order messages to maintain conversation threading
FAQ
Do I need customer opt-in for order notifications?
Utility templates (order updates, shipping, delivery) are considered transactional and tied to an existing customer action. Meta allows these without explicit marketing opt-in. However, you should collect the customer's WhatsApp number at checkout with a clear indication that updates will be sent via WhatsApp.
How much do utility templates cost?
Pricing varies by country. In the EU, utility conversations cost approximately €0.02 per conversation (24-hour window). A conversation window opens when you send a template, and you can send multiple messages within it at no extra cost.
Can I send to customers who haven't messaged me first?
Yes — that's exactly what templates are for. You initiate the conversation with an approved template. The customer doesn't need to have messaged you first.
Start sending notifications
Connect your WhatsApp Business Account and create your first template.