How to Use Webhooks in Voice Bot
Comm100 Voice Bot allows you to send data to and receive data from an external server or third-party services using Webhook. By using the HTTP POST method, Voice Bot Webhook can perform RESTful operations as per your business needs.
 
Note: Task Bot Webhooks do not accept XML format. Only the JSON format is supported.  

 

Step by Step Instructions  

To use Webhooks in Voice Bot, follow these steps: 

  1. Log in to your Comm100 account.  
  2. From the left navigation menu, go to Bot > Voice Bot > Intents.
    kb-entity-001.png
  3. In the Answer area, expand the Actions menu, scroll down to the Advanced section, and drag the Trigger a webhook action to the area.kb-webhook-01.png
  4. On the Trigger a webhook action card, click the edit icon. The Webhook drawer appears. kb-webhook-02.png
  5. On the Webhook drawer, you can set the details for the following sections:
    • URL 
      Input the endpoint URL of the external service.
      1 (1).png
    • Webhook Headers 
      Webhook headers are used for authentication with the endpoint. If the endpoint requires authentication, input the headers that Voice Bot needs to use when sending the request.
      33.png   
    • Additional Post Body 
      Add the additional request body in this section if you want to send content other than the default request body.
      additional post body.png
    • Save Response to Variable 
      You can save the data from the endpoint’s response to the voice bot’s variables, so that the data can be used as Dynamic Info in the bot’s chat flow.
       kb-webhook.png

      For example, for the following Webhook response:

      { 

         "Name": "John", 

         "Country": France, 

       } 

      You can save the response key "Name" to variable "VisitorName" and response key "Country" to variable "VisitorCountry". The variables "VisitorName" with value “John” and "VisitorCountry" with value “France” are stored in the voice bot’s database. They can then be used as Dynamic Info.
    • Response Code to Action

      Response Code to Action allows the voice bot to perform the next action based on the Webhook response code. You can add multiple codes if you want to split the flow based on the response code.
      Note: The response code indicates whether an HTTP request has been completed. To learn more about Response Codes, see this article .
      webhooks-009.png
  6. Click OK.

After the Webhook is successfully configured, you can start using it in your voice bot.