Newer Version Available
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
1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17<a href="#" onClick="testSendCustomEvent();">Send Custom Event</a>
18
19<script type="text/javascript">
20 function testSendCustomEvent() {
21 type = 'myCustomEventType';
22 data = 'myCustomEventData';
23 liveagent.chasitor.sendCustomEvent(type, data);
24 alert('The custom event has been sent');
25 };
26</script>Response
This method returns no responses.