Setting Webhook
Configure a webhook that sends chatbot event data to a URL whenever a contact selects a Welcome Message or Interaction option. For developers integrating chatbot events with an Attribute, Integration, Interaction, or Live Chat redirect.
Configure a webhook to send chatbot event data to a URL when an end user interacts with your chatbot.
You can enable webhooks for the Welcome Message or any Interaction in the chatbot's Interactions section. Select a Redirect Type, then turn on the Webhook toggle. Webhooks are disabled by default.
Activate a Webhook
When you turn on the Webhook toggle, the webhook triggers as soon as an end user selects a chatbot menu option.
For example, your chatbot can ask an end user to select a streaming membership option:
Welcome to EliPackage, enter the best option for streaming membership: 1. One month, 2. Six months, 3. One year
When the end user submits a choice, the webhook sends the selected option in option and the entered keyword in keyword.
{
"campaignId": "13010",
"label": "Welcome Message",
"option": "One month",
"keyword": 1,
"phoneNumber": "+525500000000",
"date": "2024-06-18T23:26:14.206Z"
}Configure the Webhook
- Select Attribute, Integration, Interaction, or Live Chat from the Redirect Type dropdown.
- Turn on the Webhook toggle.
- Enter your webhook URL.
- Configure the webhook payload and headers.
Your endpoint must accept POST requests with a JSON body. Use this URL format:
POST https://<Your_Domain>/<Your_Path>
Payload
Your webhook URL is the external callback endpoint that receives chatbot event data.
When you select Integration, Interaction, or Live Chat from the Redirect Type dropdown, the webhook sends the following payload:
{
"campaignId": "13010",
"label": "Welcome Message",
"option": "One month",
"keyword": 1,
"phoneNumber": "+525500000000",
"date": "2024-06-18T23:26:14.206Z"
}| Parameter | Description |
|---|---|
"campaignId" | Unique identifier of the automation. |
"label" | Chatbot interaction that triggered the webhook. In this example, it is the Welcome Message. |
"option" | Option selected by the end user. |
"keyword" | Keyword entered by the end user. |
"phoneNumber" | Phone number of the end user. |
"date" | Date and time when the webhook receives the message, in UTC Zulu format (yyyy-mm-ddThh:mm:ss.ssZ). |
Optional: Add parameters in JSON format in the Body text box.
When you select Attribute from the Redirect Type dropdown, the configured attribute and its value are added to the callback payload:
{
"campaignId": "13010",
"label": "Welcome Message",
"phoneNumber": "+525500000000",
"date": "2024-06-18T23:22:36.560Z",
[[attributeName]] : [[attributeValue]]
}| Parameter | Description |
|---|---|
"campaignId" | Unique identifier of the automation. |
"label" | Chatbot interaction that triggered the webhook. In this example, it is the Welcome Message. |
"phoneNumber" | Phone number of the end user. |
"date" | Date and time when the webhook receives the message, in UTC Zulu format (yyyy-mm-ddThh:mm:ss.ssZ). |
[[attributeName]] | Attribute name. [[attributeValue]] is the information the end user provides in response to the attribute prompt. |
When you select an existing attribute or create a new one, it appears in the Body Preview for later interactions where the webhook is enabled. The webhook sends the attribute value even if a later interaction uses a Redirect Type other than Attribute.
You can add only one attribute per interaction.
In this example, configure the Welcome Message interaction with an existing attribute named name.

- Redirect the end user to Interaction 1 after they provide their name.
- Turn on the Webhook toggle.
- Enter your webhook URL.
- Select Add to save the webhook and attribute configuration for the Welcome Message interaction.
After configuring the Welcome Message interaction, add another existing attribute to Interaction 1.

- Select an attribute, such as age, for Interaction 2.
- Turn on the Webhook toggle.
- Enter the webhook URL. The Body Preview includes
“name: [[name]]”, which shows that the previously collected name will also be sent to the webhook. - Select Add to save the option configuration.
The webhook now collects the name and age attributes and sends them to the configured URL.
NOTEThe webhook is designed to deliver the field values collected during the chatbot session. Each attribute will automatically be included in the webhook payload.
- Collection of Session Attributes: As the user interacts with the chatbot, attributes (e.g., name, email, or other data points) are collected during the session.
- Webhook Functionality Across Interactions: If the user uses the webhook functionality in any interaction, the webhook will include all previously collected session attributes in the payload.
- Comprehensive Data Delivery: This means the client will receive all the information gathered during the session, regardless of which interaction triggered the webhook.
Example
If a user enters their name in the “Welcome Message” interaction and their email, and birthday in subsequent interactions, the three (3) attributes will be sent through the webhook when it is triggered. This ensures that the client receives a complete data set from the session, allowing for seamless redirection or integration with external systems.
The Body Preview of the payload example will appear as:
{ "campaignId": "11677", "label": "Interaction 2", "phoneNumber": "+1100000123", "date": "2024-11-21T05:00:23.062Z", "name": "[[name]]", "email": "[[email]]", "birthday": "[[birthday]]" }
Headers
Add custom headers to each request sent to your webhook endpoint. The destination application can use these headers to authenticate requests and reject requests that do not include them.
Headers are key-value pairs. After adding a header, select the Edit icon to update it or the Delete icon to remove it.

The following header key-value pairs are sent with every request:

Updated about 16 hours ago
