Embedded Chat Custom Events
Create Custom Chat Events
Code Snippet Versions
There are three APIs that let you create custom chat events with Embedded Chat. Available using Embedded Service code snippet version 5.0 and later.
The legacy chat product is in maintenance-only mode, and we won’t continue to build new features. You can continue to use it, but we no longer recommend that you implement new chat channels. Instead, you can modernize your customer communication with Messaging for In-App and Web. Messaging offers many of the chat features that you love plus asynchronous conversations that can be picked back up at any time.
Important
Sends a custom event to the agent console of the agent currently chatting with a customer.
| Name | Type | Description |
|---|---|---|
type | string | The name of the custom event to send to the agent console. |
data | string | Extra data you want to send to the agent console along with the custom event. |
Retrieves a list of custom events from both the agent and chat visitor that are received during this chat session.
| Name | Type | Description |
|---|---|---|
callback | function | JavaScript method called upon completion of the method. It passes a JSON formatted string of the events. |
Registers a function to call when a custom event is received in the chat window.
| Name | Type | Description |
|---|---|---|
type | string | The type of custom event you want to listen for. |
callback | function | .JavaScript method called upon completion of the method. It passes an object that has two attributes: type and data. |
See Also