Guide
Events that trigger while interacting with the chatbot
Name | Description | Required |
---|---|---|
chatbotEnd
function
| The customer’s journey has ended within the chatbot without a Sell session request and the lead is closed Location: Chatbot Triggered: The customer reaches a chatbot node which has the action “end” Returns: cookieGuid, name, phone, email, extra, schedDate, resultCode, kpiGuid |
Optional |
chatbotNodeShown
function
|
Every time a chatbot node is shown
Location: Chatbot Triggered: The customer sees a chatbot node Returns: action, chatbotId, nodeId, nodeType, order, seed |
Optional |
chatbotBeforeExternalSelect
function
|
The customer has reached a message_session_data node containing a select field where options are loaded from an external source
Location: Message_session_data node Triggered: Just before showing the select field Returns: {
"customer": {
"name": "",
"phone": "",
"country": "",
"email": "",
"dialCode": "",
"extra": ""
},
"fields": [
"fieldId1"
]
} Callback parameters:
[{
"id": "field1",
"options": [{
"label": "Label 1",
"value": "label1"
},
{
"label": "Label 2",
"value": "label2"
}]
}]
|
Optional |
chatbotBeforeExternalCatalog
function
|
The customer has reached a message_catalog node containing a carousel where options are loaded from an external source
Location: message_catalog node Triggered: Just before showing the carousel Returns: {
"customer": {
"name": "",
"phone": "",
"country": "",
"email": "",
"dialCode": "",
"extra": ""
},
"catalog": [
"catalogId"
]
} Callback parameters:
[{
"id": "catalogId",
"options": [{
"label": "Label 1",
"value": "value1",
"imageUrl": "https://product_1.jpg"
},
{
"label": "Label 2",
"value": "value2",
"imageUrl": "https://product_2.jpg"
}]
}]
|
Optional |
chatbotBeforeExternalMessageSimple
function
|
The customer has reached a message_simple_dynamic node
containing a text with variables to be interpolated from an external
source or using filled chatbot input values
Location: message_simple_dynamic node Triggered: Just before showing the node Returns: {
"customer": {
"name": "",
"phone": "",
"country": "",
"email": "",
"dialCode": "",
"extra": ""
},
"nodeId": ""
} Callback parameters:
{
"codeVariable": "C83023",
"supportPhone": "(866) 493-8905",
} Example – message with variables:
Thanks for contacting to us, please use this code: {{codeVariable}} to validate your purchaseIf you ever have any questions that require immediate assistance, please call us at {{ supportPhone }}. Response based on Callback parameters: Thanks for contacting to us, please use this code: C83023 to validate your purchase If you ever have any questions that require immediate assistance, please call us at (866) 493-8905. | Optional |
chatbotBeforeDataCollect function | Every time a chatbot node to collect data is shown. Location: message_session_data node Triggered: Just before showing the message_session_data node Returns: { "customer": { "name": "", "phone": "", "country": "", "email": "", "dialCode": "", "extra": "" }, "nodeId": "node1" } | Optional |