# 17 · WooCommerce: order updates, unpaid reminders and abandoned-cart recovery on WhatsApp

**Purpose:** connect your WooCommerce store so every order becomes a contact in Wsapme, your customers get order updates on WhatsApp, and unpaid orders and abandoned carts are followed up automatically.

## Before you start

- You are an owner or admin of the workspace, and at least one WhatsApp number is connected (see [01 · Getting started](https://wsapme.com/guides/getting-started.md)).
- You can sign in to your store's WordPress admin as an administrator.
- Your store uses `https://` and "pretty" permalinks (WordPress → Settings → Permalinks: anything but "Plain").

**Watch first (3:14, Malay narration):** [Connect your WooCommerce store](https://wsapme.com/guide-media/video/17-woocommerce-malay.mp4)

The video shows where the WooCommerce card is, which key to create in WordPress, the connect form, what you can switch on afterwards, the Orders list and the WooCommerce trigger in Workflows. No store is connected in the video.

> **No store was connected for this guide.** The screenshots use a demo workspace with Demo mode on and show Wsapme's own pages up to the **Connect store** button, plus the workflow trigger. Everything that needs a connected store (Parts 3 to 7, 9 and the sections after them) and every step inside WordPress is written from the module documentation and the code, and is marked *(from the documentation, not captured)*. Button and field names in those parts are the ones in the product.

## Part 1 · Create the REST API key in WooCommerce

*(from the documentation, not captured: these steps are in your WordPress admin)*

1. In WordPress, open **WooCommerce → Settings → Advanced → REST API**.
2. Click **Add key**.
3. **Description:** `Wsapme`. **User:** an administrator. **Permissions:** **Read/Write**.
   - Read/Write lets Wsapme set up instant order updates by itself and, if you use it, add a note to an order that a customer confirmed.
   - A **Read** key also works. Wsapme then checks your store for orders every 5 minutes instead of receiving them at once.
4. Click **Generate API key**. Copy the **Consumer key** (it starts with `ck_`) and the **Consumer secret** (it starts with `cs_`). WooCommerce shows them only once.

## Part 2 · Connect the store in Wsapme

1. In the sidebar, under **Settings**, click **Integrations**. Find the **WooCommerce** card and click **Connect a store**.

   ![The Integrations page with the WooCommerce card highlighted](https://wsapme.com/guide-media/img/woocommerce/01-integrations-card.webp)

2. The **WooCommerce** page opens with **Connect your WooCommerce store**. The text at the top repeats where to create the key in WordPress.

   ![The WooCommerce page before a store is connected](https://wsapme.com/guide-media/img/woocommerce/02-connect-page.webp)

3. Type the **Store address** (for example `https://myshop.com`), then paste the **Consumer key** and the **Consumer secret**.
4. Leave **Also keep the AI agent's product list in sync with this store** ticked if you want the AI agent to know your products. The tick box is only shown while no shop is connected under AI Agent → Products. If you already connected this shop there, the page shows **Use this store** instead: click it and you do not need to type the keys again *(Use this store: from the documentation, not captured)*.
5. Click **Connect store**. *This button was not clicked in this guide; the address and keys in the picture are made up.*

   ![The connect form filled in, with Connect store highlighted](https://wsapme.com/guide-media/img/woocommerce/03-connect-form-filled.webp)

**What you should see** *(from the documentation, not captured)*: the store appears as a card with the badge **Connected** and **Instant updates** (or **Checked every 5 minutes** for a Read key). Wsapme keeps the keys encrypted and never shows them again. To change them, connect the same address again with a new key. To connect another store, click **Add a store**.

**If it does not connect** *(messages from the code)*

- "A consumer key starts with ck_." or "A consumer secret starts with cs_.": you pasted the wrong value into that box.
- "WooCommerce refused the keys": the key or secret is wrong, or the key was revoked. Create a new key.
- "No WooCommerce REST API was found at this address": check the address and that permalinks are not "Plain".
- "The store sent something unexpected": a security plugin or firewall is blocking the REST API. Allow requests to `/wp-json/wc/v3/`.
- "The store could not be reached": check the address and that the site is online.

## Part 3 · Choose what happens to customers

*(from the documentation, not captured)*

On the store's card, open **Customers and WhatsApp messages**:

1. **WhatsApp number for this store:** the number that sends this store's messages. **The first connected number** is the default.
2. **Owner of new customers and leads (optional)**, **Add tags to the customer (optional)** and **Create a lead in (optional)** apply when an order first arrives. With a lead stage chosen, the items become the lead title and the order total its value.
3. Click **Save settings**.

## Part 4 · Order updates on WhatsApp

*(from the documentation, not captured)*

Nothing is sent until you switch it on.

1. Under **Messages per order status**, tick a status, for example **Processing** and **Completed**. The statuses are **Pending payment**, **On hold**, **Processing**, **Completed**, **Cancelled**, **Refunded** and **Failed**, plus any custom status of your store.
2. Edit the text. Placeholders such as `{name}`, `{order_no}`, `{items}`, `{total}`, `{tracking_no}`, `{tracking_url}` and `{order_url}` are filled in for each order. A line with a tracking, link or address placeholder is left out while the order has none.
3. Click **Save settings**. Each status is sent once per order.

**Which kind of number sends?** The number list shows the kind of each number.

- **QR** numbers send your own text.
- **Official** and **Hybrid** numbers can only send an **Approved template** to a customer who has not written to you in the last 24 hours, and that is almost every store notification. For each message you switch on, choose an **Approved template** and fill its variables with the placeholders (for example `{name}`, `{order_no}`, `{tracking_url}`). Templates with a picture, video or document header, or with a variable in a button link, are not listed.

**Tracking numbers** are read from the order when you use a shipment tracking plugin (for example WooCommerce Shipment Tracking, Advanced Shipment Tracking or AfterShip).

**If a message failed**, the order shows a red badge with the reason. Fix the cause and click **Retry**.

### Tell the team about new orders

Tick **Tell the team about new orders on WhatsApp**, type up to 5 numbers with the country code under **Send to**, and under **When** choose **Every new order** or **Only paid orders (Processing or Completed)**. On an Official or Hybrid number the alert also needs an approved template.

### Cash on delivery: ask the customer to confirm

Tick **Ask cash-on-delivery customers to confirm their order**. A cash-on-delivery order then gets a "Reply YES to confirm" message instead of the normal message of its status. When the customer replies with one of your **Words that confirm** (default: YES, YA, OK, CONFIRM) within 7 days, the order is marked as confirmed. You can also tag the customer, send a **Thank-you reply**, and under **On the store, when confirmed** choose **Add an order note** or **Change the order status** (both need a Read/Write key).

## Part 5 · Remind customers about unpaid orders

*(from the documentation, not captured)*

1. Under **Recovery and follow-up**, tick **Remind customers about unpaid orders**.
2. Set when each reminder goes out. The starting values are 1 hour after the order was placed, then 23 hours after reminder 1; you can have up to 3 reminders. Edit the texts: `{payment_url}` is the link to pay for that order.
3. Click **Save settings**.

Reminders are for orders that are still **Pending payment**, **On hold** or **Failed**. A reminder is skipped the moment the order is paid or cancelled. Cash-on-delivery orders are not reminded. Reminders wait during **Quiet hours** (default 22:00 to 08:00) and on your quiet days (Broadcast settings), and are never sent to customers who opted out.

## Part 6 · Recover abandoned carts

*(from the documentation, not captured)*

WooCommerce does not tell other systems about a checkout that was started and not finished, so something on your store has to report it. Tick **Recover abandoned carts**, then pick **one** of the two ways.

### A. You already use an abandoned-cart plugin

Works with **WooCommerce Cart Abandonment Recovery (CartFlows)**.

1. In Wsapme click **Create an address for my cart plugin** and copy the address. Treat it like a password.
2. In WordPress open **WooCommerce → Cart Abandonment → Settings → Webhook Settings**, switch on **Enable Webhook**, paste the address as the **Webhook URL** and save.
3. Click **Trigger Sample** there to test. Back in Wsapme, the line **Last cart report** shows it.

That plugin reports a cart about 15 to 35 minutes after the customer left, and only when the customer typed an e-mail and a phone number. Your first waiting time in Wsapme is added on top, so keep it short.

### B. You have no abandoned-cart plugin: install the Wsapme plugin

1. Click **Download the Wsapme plugin for this store**. The file is made for this store only and holds its secret: do not share it. (The download is switched off while Demo mode is on.)
2. In WordPress open **Plugins → Add New → Upload Plugin**, choose the file, install it and activate it. There is nothing else to set up.

It reports a checkout as soon as the customer has typed a phone number, and tells Wsapme when the order is placed.

### The messages

Set when each cart message goes out (up to 3) and edit the texts, or choose templates on an Official or Hybrid number. `{cart_url}` is the link that brings the customer back to their cart. Click **Save settings**.

Carts appear under **Abandoned carts** (the 25 newest) with the messages they got. The messages stop when the customer orders or opts out.

**No plugin at all?** Then only **Remind customers about unpaid orders** (Part 5) works. It reaches customers who placed an order and did not pay, not those who left before ordering.

**Tell your customers.** The phone number and cart are sent to Wsapme before the order is placed. Mention in your privacy policy that you may send a WhatsApp reminder about an unfinished order.

## Part 7 · Follow up after the purchase

*(from the documentation, not captured)*

Under **After an order is completed, start a follow-up**, choose one of your follow-up sequences, or click **Create a starter follow-up** to get three messages you can change (a thank-you, a review request and a reorder reminder). The starter is plain text, so it is made for a QR number; on an Official or Hybrid number build the follow-up from approved templates first and choose it here. Leave **Stop it when the order is refunded or cancelled** ticked. Follow-up sequences are explained in [03 · Broadcast and follow-ups](https://wsapme.com/guides/broadcast-and-followups.md).

## Part 8 · Start a workflow from an order

An order can also start a chatbot workflow, for example to ask for a review or offer a second product. Building the flow itself is in [04 · Chatbot and workflows](https://wsapme.com/guides/chatbot-workflows.md).

1. Open a workflow (**Workflows** in the sidebar) and, in the **Trigger** card, set **Starts when** to **WooCommerce order event**.

   ![The Starts when list with WooCommerce order event highlighted](https://wsapme.com/guide-media/img/woocommerce/05-workflow-starts-when.webp)

2. Under **Order statuses**, tick the statuses that should start the flow. None ticked means any status. The flow starts once per order and status, for customers with a phone number.
3. Optional: **Order total at least** and **Order contains the product** (a product ID, or words in its name). With more than one store connected you can also tick **Stores**.

   ![The WooCommerce trigger with a status, a total and a product](https://wsapme.com/guide-media/img/woocommerce/06-workflow-order-trigger.webp)

4. Click **Save**. *Save was not clicked in this guide, and the workflow stayed a draft.*

In the messages of the flow you can use `{{woo_order_no}}`, `{{woo_status}}`, `{{woo_items}}`, `{{woo_total}}`, `{{woo_payment_method}}`, `{{woo_courier}}`, `{{woo_tracking_no}}`, `{{woo_tracking_url}}`, `{{woo_name}}`, `{{woo_address}}`, `{{woo_payment_url}}` and `{{woo_store}}`.

While no store is connected, the hint under **Order statuses** reads "Connect a store first: Settings → Integrations → WooCommerce.", as in the picture above. With a store connected it lists the placeholders below instead.

## Part 9 · The Orders list and the export

1. At the bottom of the **WooCommerce** page, **Orders** lists every order, newest first, with the customer, the items, the status and the WhatsApp updates that were sent.
2. Filter with **Any status** and **All messages** (choose **Failed messages only** to find problems), or search by order number, phone or name. With more than one store there is also an **All stores** filter.
3. **Export CSV** downloads the orders you filtered. It is switched off while Demo mode is on.

   ![The Orders section with the filters and Export CSV highlighted](https://wsapme.com/guide-media/img/woocommerce/04-orders.webp)

Under each store, **Keep orders for … months** sets how long orders stay (24 months unless you change it). Older orders are removed every night, except orders linked to an open lead. *(from the documentation, not captured)*

## Part 10 · Test it

*(from the documentation, not captured; these steps were not run against a real store)*

1. Place a test order on your store with **your own phone number**. It should appear in **Orders**, and your phone gets the message of its status.
2. Change the order's status in WooCommerce. The next message arrives; the same status is never sent twice.
3. Unpaid reminder: place an order with a payment method you do not complete (it stays **Pending payment**) and wait for your first reminder time.
4. Abandoned cart: open your store in a private window, add a product, go to checkout, type your phone number and close the window. The cart appears under **Abandoned carts**; after your first waiting time you get the message.
5. On the store's card, **Test connection** checks the keys, and **Check for orders** asks the store for new and changed orders right away.

## Managing the webhooks

*(from the documentation, not captured)*

Open **Webhooks** on the store's card. Wsapme keeps two webhooks on your store ("Wsapme: order created" and "Wsapme: order updated") so orders arrive within seconds. You do not need to open WordPress to look after them:

- The table shows each webhook's status on your store (**Active**, **Paused**, **Disabled** or **Missing**) and when it was last received.
- **Check now** asks your store again. Wsapme also looks every hour and shows **Webhook needs attention** on the card when one is missing or switched off (WooCommerce switches a webhook off after 5 failed deliveries). Orders still arrive meanwhile, because Wsapme checks your store every 5 minutes.
- **Repair** creates a missing webhook and switches a disabled one back on.
- **Remove from store** deletes Wsapme's two webhooks. **New webhook address and secret** replaces the address and secret; after that, download and install the Wsapme plugin again if you use it, because the old file stops working.

Wsapme only touches its own two webhooks, never the other webhooks of your shop. With a **Read** key Wsapme cannot manage them: the section then shows the delivery URL and secret to add by hand in WooCommerce → Settings → Advanced → Webhooks.

## The report

*(from the documentation, not captured)*

As soon as a store is connected, a **Report** card on the same page shows (all zeros until the first messages go out), per store and for **Last 7 days**, **Last 30 days** or **Last 90 days**: **Order updates sent**, **Payment reminders sent**, **Cart messages sent**, **Carts captured**, **Orders recovered** and **Recovered revenue**. An order counts as recovered when it was placed or paid after a payment reminder or a cart message. **Recovered revenue** counts only recovered orders that are **Processing** or **Completed**. The numbers are updated every 5 minutes.

## Disconnecting

*(from the documentation, not captured)*

**Disconnect** on the store's card asks you to confirm, then deletes the saved keys, removes Wsapme's webhooks from your store and stops all order messages. The orders log stays. Also deactivate the Wsapme plugin in WordPress if you installed it.

## Common problems

| Problem | What to do |
|---|---|
| A PDF (for example an invoice) arrives on the customer's phone without **.pdf** at the end of its name, so it does not open after downloading | The phone names the file after the end of the link it was sent from. Wsapme now adds the right ending (.pdf, .xlsx, .docx…) when the link has none. If you send files through the API or a workflow, give the file a name that ends in its type, for example `INV-000123.pdf`. Files sent before the fix keep their old name: send them again if a customer needs one. |
| The store will not connect | Read the message under the field and see "If it does not connect" in Part 2. The usual causes are a wrong key, "Plain" permalinks, or a security plugin blocking `/wp-json/wc/v3/`. |
| The badge says **Checked every 5 minutes**, not **Instant updates** | The key is **Read** only, or the webhooks are missing. Connect again with a Read/Write key, or open **Webhooks** and click **Repair**. |
| The badge says **Reconnect needed** | WooCommerce refused the saved keys. Create a new key in WordPress and connect the same address again. |
| Orders arrive but no WhatsApp message goes out | Messages are off until you tick a status under **Messages per order status** and click **Save settings**. On an Official or Hybrid number each message also needs an **Approved template**. Orders without a phone number get no message. |
| A message shows **failed** | Read the reason under the badge (for example the number is not connected), fix it and click **Retry**. |
| No abandoned carts appear | WooCommerce does not report them by itself: install one of the two plugins in Part 6. The CartFlows plugin only reports carts with an e-mail and a phone number, after 15 to 35 minutes. |
| **Export CSV** or the plugin download cannot be clicked | Demo mode is on. Turn it off in the user menu (bottom left). |
| You are looking for TikTok Shop | It is marked **Coming soon** on the Integrations page. |

## Related

- [03 · Broadcast and follow-ups](https://wsapme.com/guides/broadcast-and-followups.md)
- [04 · Chatbot and workflows](https://wsapme.com/guides/chatbot-workflows.md)
- [05 · AI agent and knowledge](https://wsapme.com/guides/ai-agent-and-knowledge.md)
- [07 · API, webhooks and MCP](https://wsapme.com/guides/api-webhooks-mcp.md) (the simple incoming hook "WooCommerce: order paid")
- [08 · Integrations](https://wsapme.com/guides/integrations.md)
