Send Events from your bot
Listen to events from your Bot; this is useful to make your website react to the ongoing conversation on the webchat.
Built-in Events
There are Built-In events you can use to customize the behaviour of your application.
Here is a comprehensive list of the predefined events on the platform:
Event | Description | Payload |
---|---|---|
CLSTR_WEBCHAT_INITIALIZED | Webchat initialized and interlocutor created. | null |
CLSTR_USER_OPENED_CHAT | The webchat window has been opened by the user. | null |
CLSTR_USER_CLOSED_CHAT | The webchat window has been closed by the user. | null |
CLSTR_USER_REPLIED | The user sent a reply to the bot in the webchat. | Last reply send by user, as a string. |
CLSTR_USER_INTERACTED | The user interacted with the webchat | Last reply send by user, Last button clicked by the user Last menu item clicked by the user format : { type: string, label: string } |
CLSTR_BOT_SWAPPED | The bot was successfully swapped. | Bot id of the new bot, as a string. |
CLSTR_USER_SWAPPED | The user was successfully swapped. | User Id of the new user, as a string. |
CLSTR_USER_AUTOCOMPLETE_SELECTED | The user used autocomplete | Label of the autocomplete selected |
CLSTR_USER_LINK_CLICKED | The user clicked on a link ( text or card ) | Url and label of the link. format : { url: string, label: string } |
CLSTR_AGENT_TAKE_CONTROL | The agent take control of the conversation | null |
CLSTR_AGENT_RELEASE_CONTROL | The agent release control of the conversation | null |
Custom Events
Use the Send Event action to send a custom event from one of the steps of your stories.
When listening to the event, take care of using the exact same syntax as the one configured on the Send Event action of your bot.