Chat Widget events
The following are events to which you can subscribe your chat widget.
Event type | Description |
---|---|
token | Issued when a user token is assigned. |
open | Issued the chat widget is opened. |
close | Issued the chat widget is closed. |
chatEnd | Issued when a conversation is ended. |
submitInitialForm | Issued when the initial form is submitted. |
Example of usage:
SinchSdk.Chat.addEventListener('token', () => {
SinchSdk.Chat.send('message');
});