Categories
Whatsapp Automation

Are you tired of dealing with fake cash-on-delivery orders on your WooCommerce store? Look no further! In this article, we’ll show you a simple and effective solution for verifying COD orders from your customers.

Using a WhatsApp message, you can now confirm a cash-on-delivery order by sending a message to the buyer. The buyer will receive a message on WhatsApp asking them to confirm the order by simply replying with “yes” or “no.” This easy process not only protects your store from fake orders, but also improves the customer experience by allowing them to confirm their order in a quick and convenient way.

Get ready to streamline your COD order verification process and improve your store’s security. Say goodbye to fake orders and hello to happy customers with this simple WhatsApp integration.

Let’s see how to do that by using BotBiz.

First, you need to create a message template in Botbiz, the message template that will be sent to customers as soon as they create a Cash on Delivery order.

Second, you have to create a new Webhook workflow and add the Webhook to the WooCommerce store. Then, you have to map data.

To create a message template, go to the Dashboard of Botbiz. Click on the Botmanager menu in the left sidebar of the Dashboard. Instantly, WhatsApp Bot manager page will appear.

Now click on the message template option. Instantly, the message template settings page will appear.

 

Before creating the message template, you have to create variables. At the bottom of the page, you will see the Template variable section.

 

 

To create a variable, click on the create button. Instantly, a pop-up form will appear with a field called variable name. Provide a name for the variable in the field and click on the save button. Instantly, the variable will be created.

 

In this way, create two variables – Product list and Total price.

 

You have to use the variables in the message template.

 

To create a message template, click on the create button in the Message template settings section.

 

Instantly, a modal form called a Message template will appear. You have to fill out the modal form.

 

Provide a name in the template name field.

 

Then write a message in the message body. In the message body, you have to use the total variable price and the product list.

 

 

In the message template, you have to add a Quick reply button to ask the customer if the order is fake or not.

 

To add a quick reply button, click on the Quick Reply option. Instantly, three fields called Button text will appear.

 

In the first Button Text field, write confirm the order. And in the second Button Text field, write cancel the order.

 

Then click on the save button to save the message template.

 

Now you have to check the status of the message template. Click on the Check status button to see the status of the message template.

 

 

If the status is approved, you can use the message template.

 

In the message template, I have created two quick reply buttons. Therefore, now I need to create postbacks for those quick replies.

 

To create a postback, click on the postback option. Instantly, the post-back settings page will appear with create button. Now click on the create button and you will be redirected to the visual flow builder editor.

 

Now add a Text element to the Start bot flow. On the text, element, add some text about Botbiz. Now click on the save button to save the postback.

 

In this way, create two postbacks for two quick replies.

 

The first postback will be used to confirm the order.

 

 

And the second one will be used to cancel the order.

 

 

Now you have to create a Webhook Workflow. To create a Webhook Workflow, click on the Webhook Workflow menu in the left sidebar of the dashboard.

 

Instantly, the WhatsApp Webhook Workflow page will appear with create button. Now click on the create button to create a Webhook workflow. Instantly, a section called new workflow will appear at the bottom of the page.

 

Provide a name in the Workflow name field. Select the WhatsApp account from where you want to the message. Then select the message template you have created to verify woocommerce order.

 

Now click on the create workflow button.

 

 

Instantly, a webhook callback URL will appear.

 

Now copy the Webhook URL. You have to use the Webhook callback URL in your WooCommerce plugin.

 

Now, go to your WordPress dashboard – admin dashboard. Then go to the WooCommerce plugin and then click on settings. Then click on the Advance tab.

 

Instantly, advanced settings will appear. Then click on the Webhook option.

 

Instantly, a page will appear with an add webhook button. By clicking on the add webhook button, you can add a webhook.

 

 

Now click on the add webhook button. Instantly, the Webhook data form will appear.

 

In the name field, provide a name. In the status field, select active as status. Select Order Created in the Topic field.

 

And in the Delivery URL field, paste the Webhook Callback URL that you have copied from the Botbiz.

 

 

 

 

Now Click on the Save Webhook button.

 

Now, you need to provide sample data for mapping.

 

Now go to Botbiz.

 

And Click on the 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, go to the WooCommerce store. And make a purchase order in WooCommerce.

 

 

Now return to Botbiz and click on the Connection details button. And wait a few moments to get the real data collected from the order. To get the real data, you may have to wait some time.

 

And wait a few moments to get the real data collected from the order. To get the real data from WooCommerce store, you may have to wait some time.

 

Ultimately, I have got the real data.

 

 

Now you have to configure the Webhook Response Mapping.

 

To configure the Webhook Response Mapping, you have to fill out some fields.

 

To fill out the phone number field, you have to find out the phone number in the raw data.

 

You will find the phone number in the billing section of the raw data.

 

Now click on the name field and a drop-down list of different options will appear. Now you have to select the billing->phone number option.

 

 

WhatsApp can’t send messages to a phone number that has a plus sign before the number.

 

Therefore, you need to set formatter to remove plus sign the from the phone number.

 

You can easily create a formatter to remove plus sign from a phone number.

 

Then you have to select the formatter for the phone number.

 

 

Now you have to select total price in the total price variable field.

 

 

Then you have to create a formatter for the total price.

 

 

Then select the formatter for the total price.

 

 

Now you have to fill out the Product list variable field.

 

 

Now you have to select post backs for the quick reply buttons that we have used on the Message Template. We have already created different post backs for different button. So, let’s select the post back for each of the quick reply buttons.

 

 

So, when the user clicks on the button, they will get a reply. Also, we need to confirm or cancel the order according to the button they click.

 

For that, we will use Call back APIs. Now, we will set up the API for confirming or canceling the order. For the “confirm order” button click, a note will be added to the order. The order will be cancelled if you click the Cancel Order button.

 

You can use only the “confirm order” button or both of them.

 

Let’s see how to create Callback APIs. To create a Callback API, click on the new button.

 

 

Instantly, a modal form called Callback API with two fields – Name and API Action –  will appear.

 

Provide a name in the name field. Then you have to select the API action in the API action field. Click on the Select API action field and instantly, a drop-down list of different options will appear. From the drop-down list, select  WooCommerce order note update.