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 

NameTypeDescription
typestringThe name of the custom event to send to the agent console.
datastringAdditional 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.