Video:
What is C.O.D Verification?
Cash on delivery (COD) is a great enabler for the e-commerce industry. But, it also is one of the leading sources of operational loss due to cancellations and bogus orders. Hence, reducing COD failures is the top priority for e-commerce players.
Using Exotel, you can ensure that your COD orders are legitimate before you ship them out. It also helps you in cutting the operational cost making it more economically feasible.
Advantages:
Reduce no-shows
An automated call is triggered to the customer before the delivery to confirm if the customer is ready to go ahead with the order.
To Avoid First Attempt Failure
An automated call on the day of delivery can be made to the customer to check availability and an IVR is played to reschedule if necessary. The input given by the customer will be passed to you in real-time.
Implementation of COD Verification
Automated call on placing a COD order:
An automated call is triggered when a COD order is placed to verify the order and numberYour server sends the info to Exotel:
Your server sends the customer number and call flow to be played in the automated call.Exotel dials the customer:
Exotel calls the customer with an automated voice call instantly to verify the order.Order verified:
Based on the customer’s input (press 1 to confirm, press 2 to deny, etc.), the order can be marked as verified in the CRM.
API Implementation:
Exotel API to connect a call to a flow:
https://<your_api_key>:<your_api_token><subdomain>/v1/Accounts/<your_sid>/Calls/connect
This API will first call the From number, and once they pick up the phone, it will connect them to a call flow (aka applet) that you have created in the system - like your landing app, or any other app that can play a greeting, have IVR, etc. An HTTP POST request is made to the above-mentioned API.
API Credentials:
Go to API settings and use your
- Account SID
- API Token
- API Key
You can refer to the article on where you will find the API key and token. How to find my API Key, API Token, Account SID and Subdomain?
Note for Subdomain:
If the account SID ends with any number from 0 to 9 --> Singapore Cluster (@api.exotel.com)
If the account SID ends with the alphabet “m” --> Mumbai Cluster (@api.in.exotel.com)
Mandatory Parameters:
A detailed description of various parameters and how to use the above API can be found here:
https://developer.exotel.com/api#call-customer
The call flow has to be created in the Exotel dashboard: my.exotel.com
Sample Call flow:
Steps: Go to App Bazar > Click on create > Enter the flow name
You can also refer to this article to check on how to create a call flow.
Applets to be used:
Gather
Passthru
Hangup
- Drag and drop the Gather Applet. The digits entered at the Gather applet will be captured and tabulated in the spreadsheet.
- Drag and drop the Passthru Applet.
- Use the web app URL that was created earlier, in the Passthru applet.
- Drag and drop the Hangup Applet.
- Save the flow.
- Assign an Exophone to the newly created flow
How to implement COD Verification use-case using Exotel and spreadsheets:
Open a new spreadsheet.
Upload the below code in the script editor of the spreadsheet.
Publish the code to get a web app URL.
Once deployed, copy the web app URL which will be used later in the Exotel flow.
Open your Exotel account and create the flow below in the App Builder.
Javascript Code:
//Id of the spreadsheet
//for spreadsheet https://docs.google.com/spreadsheets/d/1BsalnnI5_yBRke6brWk5G54Qwm5dgonN_YnLXJa"
// has id as 1BsalnnI5_yBRke6brWk5G54Qwm5dgonN_YnLXJa
var ID = "1M2-MShDX8pIvJlwtPwTvDCPnDSTQw_OfNuI6fODIyIk"
//Nme of the specific sheet inside the spreadsheet where data to be dumped
var SHEET_NAME = "Sheet1"
//Nme of the specific sheet inside the spreadsheet where numbers are available
function doGet(e) {
var params = JSON.stringify(e.parameters);
var jsonMapping = JSON.parse(params)
var sheet = SpreadsheetApp.openById(ID).getSheetByName(SHEET_NAME)
sheet.appendRow([jsonMapping["From"][0], jsonMapping["digits"][0]])
return ContentService.createTextOutput(e.parameters)
}
Replace the Sheet ID (var ID) from the URL as in the screenshot below
Replace the Sheet Name (var SHEET_NAME) from the sheet as in the screenshot below
Deploy the script as a web app
- Once the script is done, select the menu item Publish > Deploy as web app. A window will pop up on your screen.
- Under Project Version, type the name of the project.
- Under Execute the app as a section, select Me (Email).
- Under Who has access to the app, select Anyone, even anonymous. This helps make the web app accessible to Exotel.
- You can then click on Deploy to get the web app URL, which can be used in the Exotel flow.
Use the Webhook created in the call flow, in the pass-thru applet.
Sample Sheet Integration here:
https://docs.google.com/spreadsheets/d/1M2-MShDX8pIvJlwtPwTvDCPnDSTQw_OfNuI6fODIyIk/edit#gid=0
Case Study:
https://exotel.com/use-cases/cash-on-delivery-confirmation-solution/
If you have any questions or concerns, please connect with us using the chat widget on your Exotel Dashboard or Whatsapp us on 08088919888.
O COD VERIFICATION