Skip to content

How to send WhatsApp order confirmations and delivery updates

When a customer places an order, your backend sends an event to Pushwoosh, and a journey replies on WhatsApp with an approved Meta template filled with the order number, the item, and the delivery date. When the order ships, a second event and a second journey send the tracking link the same way.

Prerequisites

Anchor link to

This guide uses the following templates. To follow it as written, create them in WhatsApp Manager with this text. If your templates differ, map your own variables the same way.

TemplateBodyButton
order_confirmationHi! We've received your order {{1}}: {{2}}. Estimated delivery: {{3}}.None
order_shippedYour order {{1}} is on its way.Track order with the URL https://yourshop.com/track/{{1}}

In order_shipped, the {{1}} in the button URL is a separate variable from the {{1}} in the body.

Create the order events

Anchor link to

Create two custom events that carry the order data. See Custom events.

EventAttributes
OrderPlacedorder_id, item_name, delivery_date
OrderShippedorder_id, tracking_id
  1. Go to Audience > Events.
  2. Click Create event and select Custom Event.
  3. Create the first event with the attributes from the table, all of type string.
Create event window with the OrderPlaced event and its three string attributes order_id, item_name, and delivery_date
  1. Repeat steps 2 and 3 for OrderShipped.

Your developers send each event from your backend with postEvent when the order status changes. Pass the customer’s User ID in userId and the order data in attributes.

Build the order confirmation journey

Anchor link to

Set up the entry so that every order starts its own session:

  1. Go to Campaigns > Customer Journey Builder and click Create campaign.
  2. Add a Trigger-based entry to the canvas.
  3. Select the OrderPlaced event.
  4. Under How many sessions can user have at once in campaign?, select Multiple active sessions per user.
  5. In Session identifier attribute, select order_id. See Multiple active sessions per user.
Trigger-based entry with the OrderPlaced event, Multiple active sessions per user, and order_id as the session identifier attribute

Then add the message:

  1. Add a WhatsApp element after the entry.
  2. In Content, select the order_confirmation template. Each template language is a separate item, for example order_confirmation:en. The message preview shows a placeholder for each variable.
  3. Click the first placeholder.
  4. Set Variable type to Event property.
  5. Select the OrderPlaced event and the order_id attribute, then click Insert.
WhatsApp element with the order_confirmation:en template and the first message variable set to order_id
  1. Repeat for the other variables: {{2}} is item_name, {{3}} is delivery_date.
  2. To keep frequency capping from holding back an order confirmation, select Transactional as the message type. See Marketing vs transactional messages.
  3. Optionally, turn on Branch when the provider rejects the message and connect the Rejected by provider branch to an SMS or email element with the same order details. See Branch when the provider rejects the message.
  4. Check Split flow based on message read status. It turns on when you select a template, with a one-day wait. Leave it on to follow up with customers who haven’t read the message, or turn it off if the confirmation is the only step.
  5. Click Apply.
  6. Click Launch.

You don’t need an Exit element, because a customer who reaches the end of a branch leaves the journey.

If a customer has no registered WhatsApp number, the WhatsApp element skips them and they continue along the journey. With Split flow based on message read status on, they follow the Unread path when the wait ends.

Build the delivery update journey

Anchor link to

Create a second journey for delivery updates. Build it the same way as the confirmation journey, with these values:

  1. In the Trigger-based entry, select the OrderShipped event, Multiple active sessions per user, and order_id as the session identifier.
  2. In the WhatsApp element, select the order_shipped template. Its Track order button shows a placeholder in the URL.
WhatsApp element with the order_shipped:en template and an unfilled variable placeholder in the Track order URL
  1. Map the body variable {{1}} to the order_id attribute of OrderShipped, as an Event property.
  2. Click the placeholder in the Track order URL and map it to the tracking_id attribute the same way.
  3. Select Transactional as the message type and click Apply.
  4. Click Launch.

Check the results

Anchor link to

To check the confirmation journey:

  1. Send a test OrderPlaced event for your own User ID.
  2. Open the journey statistics. See Overall journey statistics.
  3. In the WhatsApp panel, check the Sent, Delivered, Read, and Delivery issues numbers.

To check the delivery update journey, repeat the same steps with an OrderShipped event.

If Sent stays at zero, check that the event comes with the User ID the customer’s WhatsApp number is registered under.