# 41 · Orders in the inbox and in messages

**Purpose:** see a customer's orders next to their chat, put an order's details into a reply in one click, and use order details
such as the order number or the tracking link in broadcasts, follow-ups and workflows, from every shop connected to Wsapme.

Orders come from **WooCommerce** ([17 · WooCommerce](https://wsapme.com/guides/woocommerce.md)), **Bizapp** and **TikTok Shop**
([38 · Google, Bizapp and TikTok Shop](https://wsapme.com/guides/google-bizapp-and-tiktok-shop-in-depth.md)), and the orders your **AI agent** takes in chats
([16 · AI agent in depth](https://wsapme.com/guides/ai-agent-selling-and-quality.md)). You see them all in one list, newest first.

## Before you start

- At least one shop sends orders to Wsapme: connect it in **Integrations** (see [08 · Integrations](https://wsapme.com/guides/integrations.md)), or let the AI agent
  take orders.
- The order has the customer's **WhatsApp number**, or Wsapme already linked it to the contact. That is how an order finds its chat.
- Nothing in this guide sends a message by itself: **Insert** only fills the reply box, and variables are filled in when a message is sent.

> This guide has no screenshots yet. The steps describe the screens as they are built.

## Part 1 · See orders in the inbox

1. Open **Inbox** and click a chat.
2. Look at the contact panel on the right (on a phone or a narrow window, tap the customer's name at the top of the chat).
   The **Orders** section lists the customer's latest 5 orders. Click **Show more** for older ones.
3. Each order shows:
   - where it came from (WooCommerce, Bizapp, TikTok Shop or AI agent) and the store name,
   - its **status** in a coloured badge (for example Awaiting payment, Processing, Shipped, Delivered, Cancelled),
   - the order number, the total and the date,
   - what was ordered,
   - the courier and the tracking number, with **Track** to open the courier's tracking page,
   - the delivery address.
4. Reply about an order without typing it out:
   - **Insert** puts a short summary in the reply box: order number, status, items, total and, once shipped, the tracking number and link.
   - **Tracking link** puts only the tracking link in the reply box.
   - Read it, change it if you like, then press **Send**. Nothing is sent until you do.
5. **Open** takes you to the order in that shop's orders log in Wsapme.

Good to know:

- Orders match a chat by the contact, or by the **WhatsApp number** on the order. An order placed with another phone number does not show.
- If your workspace lets agents see **only the contacts they own** (Settings → Contact fields), an agent sees the orders of their own
  contacts only.
- **Demo mode** hides order numbers, tracking numbers and addresses on your screen. **Insert** then shows `{order_no}` and
  `{order_tracking_url}` in the reply box, and the customer still gets the real values when you send.

## Part 2 · Use order details in messages

Order variables work everywhere `{{first_name}}` works: broadcasts, follow-up sequences, drip campaigns, workflows (messages and
questions), the values of Official WhatsApp templates, and the missed-call auto-reply. Pick one from the **Order ▾** button next to the
message box, or type it.

| Variable | What the customer sees |
|---|---|
| `{{order_no}}` | Order number, e.g. 1024 |
| `{{order_status}}` | Status, e.g. Processing or Shipped |
| `{{order_total}}` | Total with currency, e.g. RM 59.90 |
| `{{order_items}}` | What was ordered, e.g. 2× Rose Serum, 1× Toner |
| `{{order_date}}` | When the order was placed, e.g. 21 Nov 2026 |
| `{{order_payment_method}}` | How it is paid, e.g. Online banking or Cash on delivery |
| `{{order_courier}}` | Courier, once shipped |
| `{{order_tracking_no}}` | Tracking number, once shipped |
| `{{order_tracking_url}}` | Tracking link, once shipped |
| `{{order_payment_url}}` | Payment link of an unpaid order (WooCommerce, AI agent) |
| `{{order_url}}` | The customer's order page (WooCommerce) |
| `{{order_store}}` | Store name (WooCommerce, TikTok Shop) |
| `{{order_address}}` | Delivery address |
| `{{order_source}}` | Where the order came from: WooCommerce, Bizapp, TikTok Shop or AI agent |

Which order?

- The customer's **latest order**, from any shop.
- In a workflow started by **WooCommerce order event**, **Bizapp order event** or **TikTok Shop order event**, the variables describe
  the order that started the workflow, even if the customer ordered again since.

Empty values:

- A variable is empty when the order does not have that detail yet (no tracking before it ships) or the customer has no order.
  Add a fallback after a `|`: `Track it here: {{order_tracking_url|we will send the link once it ships}}`.
- In an **Official WhatsApp template** value, a variable that comes out empty is sent as **-**, because WhatsApp refuses a template with an
  empty value.
- If a contact field, a broadcast list column or a workflow answer has the same name (for example `order_no`), that value is used.

In **quick replies** write them with one pair of braces, like `{name}`: `Hi {name}, your order {order_no} is {order_status}.` Click
**Order ▾** in the quick reply form to pick one. When you use the quick reply in a chat, Wsapme fills in that customer's latest order.

Examples:

- Broadcast to customers who ordered: `Hi {{first_name|there}}, thank you for order #{{order_no}}! Rate it here: https://…`
- Workflow after a shipping update: `Your order {{order_no}} is on the way with {{order_courier}}. Track it: {{order_tracking_url}}`
- Quick reply: `Your order {order_no} ({order_items}) is {order_status}.`

The same orders are available to developers and AI assistants: `GET /v1/contacts/{id}/orders` in the API and the
`list_contact_orders` tool of the MCP connector ([7 · API, webhooks and AI assistants](https://wsapme.com/guides/api-webhooks-mcp.md)).

## Common problems

| Problem | What to do |
|---|---|
| The **Orders** panel is empty | The number on the order is different from the customer's WhatsApp number (for example an office phone), or the shop is not connected. Check the shop in **Integrations** and the phone number on the order in the shop. Orders placed with another number do not show in this chat. |
| The panel says "No store is connected yet" | Connect WooCommerce, Bizapp or TikTok Shop in **Integrations**, or switch on orders in the AI agent. |
| The panel says "You can see orders only for contacts you own" | Your workspace lets agents see only their own contacts. Ask an owner or admin to make you the contact's owner, or to change Settings → Contact fields. |
| `{{order_tracking_url}}` is blank | The order has no tracking yet: it has not shipped, or the shop did not send a tracking number. Add a fallback, e.g. `{{order_tracking_url|we will send it once it ships}}`. |
| An order variable shows another order than I expected | Variables use the customer's **latest** order from any shop. To talk about one specific order, use a workflow started by that shop's order event, or **Insert** in the inbox. |
| A template message arrived with "-" in it | The variable was empty for that customer (for example no tracking yet), and WhatsApp does not accept empty template values. Add a fallback, or send the template only to customers who have that detail. |
| The broadcast check says `{{order_number}}` is not a contact field | The name is misspelt. Use the **Order ▾** button to insert the right one, e.g. `{{order_no}}`. |
| A quick reply put `{order_no}` in the reply box as written | Wsapme could not load the customer's orders (for example the connection dropped). Delete the text and pick the quick reply from the `/` list again. In a chat whose customer has no order, the variable becomes empty instead. |
