It’s live! Access exclusive 2024 live chat benchmark data & see how well your team is performing.

Get the data
How to Use Webhooks in Task Bot
Comm100 Task Bot allows you to send and receive data to an external server or third-party services like Salesforce, Zendesk, Zapier, etc, using Webhook. By using the HTTP POST method, Task 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 start using Webhooks in Task Bot, follow these steps: 

  1. Log in to your Comm100 account.  
  2. From the left navigation menu, go to Bot > Task Bot > Task Bots .
    webhooks-001.png
  3. On the Task Bots page, click the Edit icon under the Operations column.
    webhooks-002.pngYour Task Bot page appears. 
  4. Expand the Actions menu, scroll down to the Advanced section and drag the Trigger a webhook action to the Bot builder area.kb-taskbot-02.png
  5. On the Trigger a webhook action, click the Edit icon. The Webhook drawer appears.  webhooks-004.png
  6. On the Webhook drawer, you can set the details for the following sections:
    1. URL 
      In this section, you can set the URL (endpoint) of the external API.
      1 (1).png
    2. Webhook Headers 
      Webhook Headers are commonly used for authorization, specifying the content type, and so forth. You can use this section if you want to send headers.
      33.png   
    3. Additional Post Body 
      You can use the Additional Post Body section if you need to send information in the request body instead of the URL. The Additional Post Body section supports JSON format.
      additional post body.png
    4. Save Response to Variable 
      If your response contains variables, you might want to save the response values to bot variables every time it is triggered to: 
      • Split the Task Bot flow -  For example, verify the record in CRM to find if the user is an existing customer.  
      • Display data as options in the next step using Dynamic Info - For example, get up-to-date inventory data from the external database and display them as products for purchase.
      • Store a record - For example, get a user's data from a 3rd-party API, and save it in your database via another webhook.
         webhooks-007.png

        For example, if the response is:

        { 

           "Name": "John", 

           "Country": France, 

         } 

        Then you can save the key "Name" to variable " VisitorName" and save the "Country" to variable "VisitorCountry."
    5. Response Code to Action

      If you want to split the flow based on the response code, you can use the Response Code to Action section.
      Note: These Response Codes  indicate whether a  specific HTTP request has been co mpleted. To learn more about Response Codes, see  this article .
      webhooks-009.png
    6. Click OK.

Once all sections are saved, you can start using Webhooks in your Task Bot.