Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

chasitor.sendCustomEvent()

Sends a custom event to the agent console of the agent who is currently chatting with a customer. Available in API version 29.0 or later.

Syntax

1liveagent.chasitor.sendCustomEvent(type:String, data:String)

Arguments

Name Type Description
type string The name of the custom event to send to the agent console.
data string Additional data you want to send to the agent console along with the custom event.

Sample Code–Visualforce

1<a href="#" onClick="testSendCustomEvent();">Send Custom Event</a>
2
3<script type="text/javascript">
4        function testSendCustomEvent() {
5            type = 'myCustomEventType';
6            data = 'myCustomEventData';
7            liveagent.chasitor.sendCustomEvent(type, data);
8            alert('The custom event has been sent');
9        };
10</script>

Response

This method returns no responses.