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:
- Log in to your Comm100 account.
- From the left navigation menu, go to Bot > Task Bot > Task Bots .
- On the Task Bots page, click the Edit icon under the Operations column.
Your Task Bot page appears. - Expand the Actions menu, scroll down to the Advanced section and drag the Trigger a webhook action to the Bot builder area.
- On the Trigger a webhook action, click the Edit icon. The Webhook drawer appears.
- On the Webhook drawer, you can set the details for the following sections:
- URL
In this section, you can set the URL (endpoint) of the external API. - 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.
- 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. - 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.
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."
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 .- Click OK.
- URL
Once all sections are saved, you can start using Webhooks in your Task Bot.