Skip to content
Support Videos What’s New

Embedded chatbot 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).

Payload example:

{
"type": "oncehub.chatbot.loaded",
"payload": {
"bot_id": "BOT-1234",
"bot_name": "example bot"
}
}

Payload example:

{
"type": "oncehub.chatbot.opened",
"payload": {
"bot_id": "BOT-1234",
"bot_name": "example bot"
}
}

Payload example:

{
"type": "oncehub.chatbot.started",
"payload": {
"bot_id": "BOT-1234",
"bot_name": "example bot"
}
}

Payload example:

{
"type": "oncehub.chatbot.closed",
"payload": {
"bot_id": "BOT-1234",
"bot_name": "example bot"
}
}

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"
}
}