Syntax
Parameters
The name of the event to subscribe to, for example,
'send', 'receive', 'chat:ready'.The callback function to run when the event occurs. Receives
(event, instance) as parameters.Returns
void
Returns a
void operator.Examples
The following examples show different ways to subscribe to events:Considerations
Common Events
-
chat:ready
Fired when the chat is fully loaded and ready. -
pre:send
Fired before a message is sent. -
send
Fired after a message is sent. -
pre:receive
Fired before a message is received. -
receive
Fired after a message is received. -
feedback
Fired when user provides feedback. -
userDefinedResponse
Fired for custom response types. -
pre:restartConversation
Fired before conversation restart. -
restartConversation
Fired after conversation restart. -
pre:threadLoaded
Fired before a thread is loaded from history. -
authTokenNeeded
Fired when authentication token needs refresh. -
view:pre:change
Fired before view state changes. -
view:change
Fired after view state changes.
Do you need practical examples?
Learn how to apply the features available for embedded chat into your implementation with guidance and examples.

