- onMessage — User or bot message
- onWebhook — Webhook node in dialog
- onAgentTransfer — Agent Transfer node
- onEvent — Dialog or FAQ ends
- onAlert — Alert message received
- onVariableUpdate — Bot published
- onClientEvent — Client event from third-party app
onMessage
Fired for every message exchange. Contains two sub-events:onUserMessage
Triggered when a user message is received by the channel adapter. Syntax:onBotMessage
Triggered when the bot sends a message to the user. Syntax:onWebhook
Triggered when the Platform NL Engine reaches a Webhook node in the dialog flow. Execute business logic and send the updated context back. Syntax:
Example — Return hotel results:
onAgentTransfer
Triggered when the Platform NL Engine reaches an Agent Transfer node. Use this to seamlessly hand off to a live agent. Syntax:
Example payload:
onEvent
Triggered when a Dialog Task or FAQ ends. Syntax:
Example:
Contact Center Events
The Platform emits real-time Contact Center Events to the BotKit channel viaonEventNode. These events cover agent actions and conversation lifecycle changes.
These events are only emitted for bots connected to the BotKit channel.
agent_accepted
Triggered when an agent accepts an incoming conversation. Payload fields:sessionId, agentId, agentName, assignedAt, acceptedAt, channelType, userId, conversationId, botId, queueId
conversation_transfer
Triggered when an agent transfers the conversation to another agent or queue. Payload fields:sessionId, fromAgentId, toAgentId or toQueueId, transferSummary, timestamp
agent_joined_conversation
Triggered when an agent joins an ongoing conference-style conversation. Payload fields:sessionId, agentId, timestampJoin, timestampLeave
agent_exited_conversation
Triggered when an agent exits a conference conversation. Payload fields:sessionId, agentId, timestampJoin, timestampLeave
conversation_terminated
Triggered when a conversation ends (by user, agent, or timeout). Payload fields:sessionId, agentId, userId, timestamp, dispositionSummary, dispositionSets
disposition_submitted
Triggered when a disposition code is submitted post-conversation. Payload fields:sessionId, agentId, dispositionCode, dispositionSummary, timestamp
onAlert
Triggered when a user receives an alert message. Syntax:onVariableUpdate
Triggered when the bot is published (variable_update event).
Syntax:
onClientEvent
Triggered when the bot receives a client event from a third-party application. Used to handle typing indicators and read receipts. Syntax:
Example requests and responses:
Typing started — Request: