chasitor.sendCustomEvent()
顧客と現在チャットしているエージェントのエージェントコンソールにカスタムイベントを送信します。API バージョン 29.0 以降で使用できます。
構文
1liveagent.chasitor.sendCustomEvent(type:String, data:String)引数
| 名前 | 型 | 説明 |
|---|---|---|
| type | string | エージェントコンソールに送信するカスタムイベントの名前。 |
| data | string | カスタムイベントと共にエージェントコンソールに送信する追加データ。 |
サンプルコード – 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>応答
このメソッドは応答を返しません。