Embedded chatbot events
List of supported events
Section titled “List of supported events”| Event name | Fires when |
|---|---|
oncehub.chatbot.loaded |
Chatbot widget is first loaded, on page load. |
oncehub.chatbot.opened |
Visitor clicks anywhere to interact with the chatbot. |
oncehub.chatbot.started |
Visitor starts interacting with the chatbot. |
oncehub.chatbot.closed |
Visitor closes the chatbot widget. |
oncehub.chatbot.button_clicked |
Visitor submits an answer in the chatbot (by clicking send or pressing enter). |
Events payloads
Section titled “Events payloads”oncehub.chatbot.loaded
Section titled “oncehub.chatbot.loaded”Payload example:
{ "type": "oncehub.chatbot.loaded", "payload": { "bot_id": "BOT-1234", "bot_name": "example bot" }}oncehub.chatbot.opened
Section titled “oncehub.chatbot.opened”Payload example:
{ "type": "oncehub.chatbot.opened", "payload": { "bot_id": "BOT-1234", "bot_name": "example bot" }}oncehub.chatbot.started
Section titled “oncehub.chatbot.started”Payload example:
{ "type": "oncehub.chatbot.started", "payload": { "bot_id": "BOT-1234", "bot_name": "example bot" }}oncehub.chatbot.closed
Section titled “oncehub.chatbot.closed”Payload example:
{ "type": "oncehub.chatbot.closed", "payload": { "bot_id": "BOT-1234", "bot_name": "example bot" }}oncehub.chatbot.button_clicked
Section titled “oncehub.chatbot.button_clicked”Payload example:
{ "type": "oncehub.chatbot.button_clicked", "payload": { "bot_id": "BOT-1234", "bot_name": "example bot", "button_text": "confirm", "interaction_label": "single_choice", "question_text": "Sales Team Calendar", "answer": "100-500" }}