Embedded chatbot widget

List of supported events

Event nameFires when
oncehub.widget.loadedChatbot widget is first loaded, on page load.
oncehub.widget.openedVisitor clicks anywhere to interact with the chatbot.
oncehub.widget.closedVisitor closes the chatbot widget.
oncehub.widget.button_clickedVisitor clicks on a button during the chatbot conversation.
oncehub.conversation.startedVisitor starts interacting with the chatbot.

Events payloads

oncehub.widget.loaded

Payload example:

{  
  "type": "oncehub.widget.loaded",  
  "payload": {  
    "bot_name": "example bot"  
  }  
}

oncehub.widget.opened

Payload example:

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

oncehub.widget.closed

Payload example:

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

oncehub.widget.button_clicked

Payload example:

{
  "type": "oncehub.widget.button_clicked",
  "payload": {
    "bot_name": "example bot",
    "bot_id": "BOT-1234",
    "button_text": "confirm",
    "interaction_label": "schedule"
  }
}

oncehub.conversation.started

Payload example:

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