Fake cash-on-delivery (COD) orders can be a major issue for WooCommerce store owners. With WhatChimp, you can set up an automated WhatsApp message to confirm COD orders before processing them. This guide will walk you through setting up a WhatsApp confirmation system to verify COD orders easily.
Table of Contents #
- Setting Up a WhatsApp Order Confirmation System
- Setting Up Postbacks for Order Confirmation
- Creating a Webhook Workflow
- Configuring the Webhook Response Mapping
- Setting Up Callback APIs for Order Confirmation & Cancellation
- Adding Rules for Cash-on-Delivery Orders
- Testing the WhatsApp Order Confirmation System
- FAQs
- Tips & Troubleshooting
1. Setting Up a WhatsApp Order Confirmation System #
Creating a Message Template #
- Go to WhatChimp Dashboard > Bot Manager > Message Template.
- Create two variables: Product List and Total Price.
- Click Create, enter a Template Name, and write the message body using the two variables.
- Add Quick Reply buttons: “Confirm Order” and “Cancel Order”.
- Click Save.
Adding Quick Reply Buttons #
- Ensure the Confirm Order and Cancel Order buttons are linked to postback actions.
2. Setting Up Postbacks for Order Confirmation #
You need to create postbacks for those quick replies.
To create postback follow the instructions:
- Configure the Start Bot Flow component. Double-click on the Start Bot Flow component.
- Enter a Title.
- (Optional) Add a Label and Sequence.
- Add a Text element to the Start Bot Flow component.
- Configure the Text element.
- Double-click on the Text element -> write a message in the field -> click on the ok button.
- Click Save.
- Repeat for both Confirm Order and Cancel Order postbacks.
3. Creating a Webhook Workflow #
Now you have to create a Webhook workflow. To create a webhook workflow, follow the instructions below:
Adding the Webhook to WooCommerce #
- In WhatChimp, go to Webhook Workflow and click Create Workflow
Instantly, a webhook callback URL will appear.
- Provide a Workflow Name and select the previously created Message Template.
- Copy the Webhook Callback URL to use in your WooCommerce plugin.
- Go to your WordPress dashboard – admin dashboard ->the WooCommerce plugin-> click on settings -> click on the Advanced tab.
- Click Add Webhook and fill out the details:
- Name: Enter a name.
- Status: Set to Active.
- Topic: Select Order Created.
- Delivery URL: Paste the Webhook Callback URL.
- Click Save Webhook.
Capturing Webhook Response Data #
You need to provide sample data for mapping.
- In WhatChimp, click Capture Webhook Response.
Instantly, the Webhook Response Mapping page will appear with raw data.
It is sample data. When a Webhook is added, the sample data will be provided automatically. Just ignore this data.
- You need to send real data to webhook– complete order data.
To do that, place a purchase order in WooCommerce.
- Now return to WhatChimp -> click on the Connection details button
- Wait for real order data to appear.
After getting the real data, you have to configure the Webhook Response Mapping. To configure the Webhook Response Mapping, you have to fill out some fields.
4. Configuring the Webhook Response Mapping #
After getting the real data, you have to configure the Webhook Response Mapping. To configure the Webhook Response Mapping, you have to fill out some fields.
- In Webhook Response Mapping, match fields:
- Phone Number → Select billing phone number.
- Total Price → Select total price variable.
- Product List → Select line_items.
You have to use a formatter for the product list because there may be one item in the order.
Now let’s see how to create a formatter for the product list.
- Click on the new button in Data formatter section.
- Provide a name in the Name field.
- Select concat list items in the Action field.
- Put a comma in the glue field.
- Write “name” in the position field.
- Click on the Save Formatter button.
- Select the formatter in the product list field.
- Now you have to select postback for the quick reply buttons in the message template.
- Select Confirm order postback for the Confirm order field
- Select Cancel order postback for the Cancel order field
5. Setting Up Callback APIs for Order Confirmation & Cancellation #
- Go to Callback APIs > Click New.
- Provide a Name.
- Select WooCommerce Order Note Update.
- Choose the integrated WooCommerce Store.
- Write a confirmation note in the note field
- Click Save Callback API.
- Repeat for Cancel Order API.
- Assign the callback APIs to respective quick reply buttons.
- Now for the Confirmation order, select the Callback Api you have just created now.
- Likewise, you have to create another callback API for cancel order button.
After you have created the Callback Api, select the API for cancel the order.
You don’t need to use the delay option because the message needs to be sent immediately. But you need to add a rule because this message will be sent only to those who place the order with cash on delivery.
Follow the instruction below to add a rule:
- Select the first option and then click on the Add rule button.
- Instantly, three fields – select data field, select operator, put value – will appear.
- In the select data field, select payment method: cod option.
- In the select operator field, select Equal(=) option.
- Write cod, in the put value field.
- Click on the save workflow button.
To see the report, click on the Workflow report button.
6. Adding Rules for Cash-on-Delivery Orders #
- In Webhook Workflow, click Add Rule.
- Instantly, three fields – select data field, select operator, put value – will appear.
- Select Payment Method: COD.
- Choose Equal (=) as the operator.
- Enter COD as the value.
- Click Save Workflow.
- To see report, click on the Workflow report button.
7. Testing the WhatsApp Order Confirmation System #
- Place a Cash on Delivery Order in WooCommerce.
- Check WhatChimp to see if the workflow has been executed
- Confirm if a WhatsApp message is sent with order details.
- Make another order.
- After the BotSailor sends the WhatsApp message, let’s click on the Cancel button.
- go to the WooCommerce store order,
- The order has been cancelled.
8. FAQs #
1.What happens if the customer does not respond?
- The order remains unconfirmed, and you can set a manual follow-up process.
2. Can I use this for prepaid orders?
- Yes, but it’s primarily designed for COD orders to prevent fake orders.
3. Will this work with multiple WhatsApp accounts?
- Yes, if WhatChimp is connected to multiple WhatsApp numbers.
Q: What if the message doesn’t send? A: Ensure the phone number format is correct (without a plus sign +).
9. Tips & Troubleshooting #
- Ensure the Webhook URL is correctly copied to WooCommerce settings.
- Use correct variable mapping to ensure order details are included.
- Check WooCommerce API permissions if Webhook is not working.
- Manually test with a sample order before going live.
With this setup, you can efficiently confirm cash-on-delivery orders, reducing fake orders and improving order processing efficiency. 🚀