messenger
5669
Verify WooCommerce COD Orders Via WhatsApp Webhook Workflow

In this article, I will show you how to verify a cash-on-delivery order from the customer.

We have also created a video tutorial on how to verify a cash-on-delivery order from the customer.

You can watch the video tutorial:

It will be very helpful to protect fake orders on WooCommerce Store.

You can now confirm a cash-on-delivery order by sending a WhatsApp message to the buyer.The buyer will get a message on WhatsApp asking them to confirm the order by saying yes or no.

It will send a message to customers, asking them to confirm the order.

Let’s see how to do that by using the BotSailor.

First, you need to create a message template in BotSailor, 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, follow the instructions step by step:

  1. , Go to theDashboard of BotSailor-> Click on theBot Manager menuin the left sidebar of the Dashboard -> click on themessage templateoption.

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 follow the below instructions:

  1. Click on thecreate button-> provide a name for the variable in theName field-> Click on theSave button.
  2. In this way, create two variables –Product list and Total price.

To create a message template, follow the instructions below:

  1. Click on thecreate button-> provide a name in thetemplate name field-> write a message in themessage body-> use the two variables --total priceandproduct list.
  2. Click on theQuick Reply option-> write confirm order in the firstButton Text field-> writecancel orderin the second Button Text field -> click on thesave button.
  3. Click on theCheck status buttonto see the status of the message template.

Read the blog to know more on how to create message template by BotSailor:

How to create a Message Template for WhatsApp by BotSailor

You need to create postbacks for those quick replies.

To create postback follow the instructions:

  1. Click on thePostback option -> Click onCreate button.
  2. Configure theStart Bot Flow component.Double-click on theStart Bot Flow component.
  3. Provide a title in theTitle field. Choosing a Label and choosing a sequence is optional.
  4. Click on theSave button.
  5. Add aText elementto the Start Bot Flow component.
  6. Configure theText element.
  7. Double-click on theText element-> writes amessagein the field -> click onok button.
  8. Click on theSave button.

Image

In this way, you have to create two postback --Confirm OrderandCancel Order. You have to use the two postback for the two quick replies.

Now you have to create a Webhook workflow. To create a webhook workflow, follow the instructions below:

  1. Click on theWebhook Workflowmenu in the left sidebar of the dashboard.
  2. Click on thecreate button.
  3. Scroll down to the bottom of the page to theWorkflow detailssection.
  4. Provide a name in the Workflowname field-> Then select themessage templateyou have created to verify woocommerce order.
  5. Click on thecreate workflowbutton.

Image

  • Now copy theWebhook URL.

Image

  1. Go to yourWordPress dashboardadmin dashboard->theWooCommerce plugin-> click onsettings-> click on theAdvance tab.
  2. Click on theWebhooksoption on the advanced settings page.
  3. Click on theAdd Webhookbutton.

Image

Image

Instantly, the Webhook data form will appear. Fill out the form:

  1. Provide anamein theNamefield.
  2. SelectActivein theStatusfield.
  3. SelectOrder Createdin theTopic field.
  4. In theDelivery URLfield, paste theWebhook Callback URLthat you have copied from the BotSailor.
  5. Now Click on theSave Webhook button.

Image

Now, you need to provide sample data for mapping.

  1. Now go toBotSailor.
  2. Click on theCapture Webhook Response.

Image

Instantly, the Webhook Response Mapping page will appear with raw data.

Image

It is sample data. When a Webhook is added, the sample data will be provided automatically. Just ignore this data.

  1. To do that, go to theWooCommerce store-> make apurchase orderin WooCommerce.

Image

  1. Now return toBotSailor-> click on theConnection detailsbutton
  2. Wait a few moments to get the real data collected from the order.

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.

  1. select thebilling->phone numberoption in the Phone Number field.
  2. Create and set a formatter to remove the plus sign from the phone number. (BecauseWhatsApp can’t send messages to a phone number that has a plus sign before the number.)
  3. Selecttotal pricein thetotal price variablefield.
  4. Selectline_itemsin theProduct list variablefield.

Image

You have to use a formmater 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.

  1. Click on the new button in Data formatter section.
  2. Provide anamein theName field.
  3. Selectconcat list itemsin theActionfield.
  4. Put acommain thegluefield.
  5. Write "name" in the position field.
  6. Click on theSave Formatter button.

Image

  1. Now select the formatter in the product list field.

Image

Now you have to select postback for the quick reply buttons in the message template.

  1. SelectConfirm orderpostback for theConfirm orderfield
  2. SelectCancel orderpostback for theCancel orderfield

Image

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.

  1. To create aCallback API, click on thenew button
  2. Provide anamein thename field.
  3. SelectWooCommerce order note updatein theAPI action field
  4. In theSelect Store API field, select anintegrated WooCommerce Store.
  5. Write anotein theNote field.
  6. Click on theSave Callback APIbutton.

Image

Image

Now for the Confirmation order, select the Callback Api you have just created now.

Image

Likewise, you have to create another callback API for cancel order button.

Image

After you have created the Callback Api, select the API for cancel the order.

Image

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 sentt only to those who place the order with cash on delivery.

Follow the instruction below to add a rule:

  1. Select thefirst optionand then click on theAdd rulebutton.
  2. Instantly, three fields –select data field,select operator,put value– will appear.
  3. In theselect datafield, selectpayment method: cod option.
  4. In the selectoperator field, selectEqual(=) option.
  5. Writecod,in theput value field.
  6. Click on thesave workflowbutton.

Image

To see report, click on theWorkflow reportbutton.

Image

Now let's see how it works.

  1. Go toWooCommerceand place an order with cash on delivery
  2. Refresh theBotSailorto see if the workflow has been completed or not. Yes, the Workflow has been completed.
  3. Let’s check on WhatsApp.
  4. Yes, the message has been arrived. The message has the total price and product list.
  5. Now, if we click on theconfirm button, a message will arrive and the purchase order should be confirmed on the WooCommerce shop.
  6. And if we click on theCancel orderbutton, a message will arrive and it will cancel the order.
  7. Let’s go to WooCommerce to check the order.

Image

Image

Image

  1. Let’s go to WooCommerce to check the order.
  2. Click on the order, you can see that the note has been updated.

Image

Image

  1. Make another order.
  2. After the BotSailor sends the WhatsApp message, let’s click on the Cancel button.
  3. go to the WooCommerce store order,
  4. The order has been cancelled.

Image

This is how you can use BotSailor’s WhatsApp integration with your WooCommerce store to verify the cash on delivery orders.

Thank you for reading the article.

Related Articles:

Send WooCommerce Abandoned Cart Recovery Message to WhatsApp by BotSailor

Send Automated WhatsApp message from Google Sheets by Using BotSailor

How to Integrate Shopify for WhatsApp Automation in BotSailor

How to Send Shopify Order Notification to WhatsApp with BotSailor

How to Verify a Shopify Cash on Delivery Order by WhatsApp with BotSailor

How to Recover Shopify Abandoned Cart by WhatsApp with BotSailor

Verify Shopify cash on delivery orders by WhatsApp with BotSailor Webhook Workflow.

How to Send Shopify Order Notifications to WhatsApp by BotSailor Webhook Workflow

author

Kamrul Hasan

12 Dec 2022
  • Categories :

  • Uncategorized

(0) Comments

Related Articles

Stay ahead of the curve with BotSailor`s latest articles. Dive into expert analyses, industry trends, and actionable tips to optimize your experience. Explore our articles now and unlock the full potential of your business.

Train AI Assistant for Chatbot With FAQ, URL & File

Train AI Assistant for Chatbot With FAQ, URL & File

Train AI Assistant for Chatbot With FAQ, URL & FileBotSailor's just launched its AI Assistant chatbot feature giving...

READ MORE
Launch Your SaaS with BotSailor White Label Chatbot Marketing

Launch Your SaaS with BotSailor White Label Chatbot Marketing

Unlock a Profitable Business with BotSailor's White Label Reseller Program Are you looking for an effortless way to ...

READ MORE
WhatsApp Broadcasting List: A guide to WhatsApp Bulk Messaging (2024)

WhatsApp Broadcasting List: A guide to WhatsApp Bulk Messaging (2024)

WhatsApp broadcasting is an extremely powerful way by which businesses can conne...

READ MORE