> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpressbot.org/llms.txt
> Use this file to discover all available pages before exploring further.

# COD Confirmation

> Ask cash-on-delivery customers to confirm or cancel their order with a tap on WhatsApp.

## What is this?

**COD confirmation** helps you avoid failed cash-on-delivery deliveries. When a customer places a COD order, the platform sends them a WhatsApp message with **Confirm** and **Cancel** buttons. Their tap updates the order in your store automatically.

It works with [Shopify](/workspace/integrations/shopify) and [WooCommerce](/workspace/integrations/woocommerce).

\[SCREENSHOT: cod-confirmation-options — The COD confirmation options on the setup page: confirm and cancel buttons, tag, and replies]

## What can I do here?

* Send a template with two buttons to every new COD order
* **Confirm** — tag the order (Shopify) or add a private note (WooCommerce)
* **Cancel** — cancel the order in your store
* Send an optional WhatsApp reply after each choice
* Change what counts as a COD payment method

## How to use it

<Steps>
  <Step title="Create a template with two buttons">
    Create a WhatsApp template with two **quick reply** buttons, for example *Confirm* and *Cancel*. See [Templates](/workspace/whatsapp/templates).
  </Step>

  <Step title="Map it to the COD status">
    While connecting your store (or on **Finish setup**), choose that template for **COD (awaiting confirmation)** in the status list.
  </Step>

  <Step title="Choose the buttons">
    Under **COD confirmation**, pick the **Button that confirms** and the **Button that cancels**. If your template has exactly two buttons, the first confirms and the second cancels — you can swap them.
  </Step>

  <Step title="Set the options">
    Fill in what you need:

    | Option                              | Store       | What it does                                                                                           |
    | ----------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------ |
    | **Tag added when confirmed**        | Shopify     | Adds this tag to the order, for example `cod-confirmed`, so you can filter confirmed orders            |
    | **Order note added when confirmed** | WooCommerce | Adds a private note your team sees; the customer doesn't                                               |
    | **Reply after Confirm**             | Both        | Optional WhatsApp message sent after they confirm                                                      |
    | **Reply after Cancel**              | Both        | Optional WhatsApp message sent after they cancel                                                       |
    | **COD payment method names**        | Both        | Comma-separated names to treat as COD. Leave empty to detect "Cash on Delivery" or "COD" automatically |
  </Step>

  <Step title="Set up and activate">
    Click **Set up and activate**.
  </Step>
</Steps>

## What happens to the order

| Customer taps | Shopify                                           | WooCommerce                                                     |
| ------------- | ------------------------------------------------- | --------------------------------------------------------------- |
| **Confirm**   | The tag is added to the order                     | A private note is added                                         |
| **Cancel**    | The order is cancelled and items go back to stock | The order status changes to **Cancelled**; WooCommerce restocks |

Only orders that can still be changed are touched:

* **Shopify** cancels only orders that aren't already cancelled and haven't been fulfilled.
* **WooCommerce** never changes completed, cancelled, refunded, or failed orders.

## Things to know

* **What counts as COD.** In Shopify, an unpaid order whose payment method matches your COD names. In WooCommerce, an open order (pending, processing, or on hold) paid by cash on delivery.
* **Permissions.** Shopify needs write access to orders, and the WooCommerce key needs **Read/Write** permission.
* **Build your own.** You can add the same actions to any flow with the order steps in the [builder](/workspace/automation/steps/integrations).

## Troubleshooting / Technical Notes

* **"This template needs two quick-reply buttons."** The COD template must have two quick-reply buttons. Edit or choose another template.
* **A reconnect notice appears (Shopify).** The store was connected without permission to change orders. Disconnect and reconnect Shopify and approve the new access. Until then, COD confirmation can't be set up.
* **COD orders don't get the message.** Check the order is unpaid and its payment method matches your COD names, and that a template is chosen for **COD (awaiting confirmation)**.
* **A tap does nothing.** The order may already be cancelled or fulfilled (Shopify), or finished (WooCommerce), so it was left unchanged.
* **A WooCommerce action fails.** The consumer key may be read-only. Update it in the store's **Settings**.

## Related docs

* [Shopify](/workspace/integrations/shopify)
* [WooCommerce](/workspace/integrations/woocommerce)
* [Abandoned Cart Recovery](/workspace/integrations/abandoned-cart)
* [Templates](/workspace/whatsapp/templates)
