onChatCriticalWaitState()
チャットへの応答が不可欠になるか、待機中のチャットが応答されるとコールされる関数を登録します。API バージョン 29.0 以降で使用できます。
構文
1sforce.console.chat.onChatCanceled(chatKey:String, callback:Function)引数
| 名前 | 型 | 説明 |
|---|---|---|
| chatKey | String | 待機時間経過状態が変更されたチャットに関連付けられた chatKey。 |
| callback | function | メソッドの完了時にコールされる JavaScript メソッド。 |
サンプルコード – Visualforce
1<apex:page >
2 <apex:includeScript value="/support/console/52.0/integration.js"/>
3 <script type="text/javascript">
4 var eventHandler = function (result) {
5 alert('This chat has reached a critical wait');
6 }
7 //Get the value for 'myChatKey' from the sforce.console.chat.getDetailsByPrimaryTabId() or other chat methods.
8 //These values are for example purposes only
9 var chatKey = 'myChatKey';
10 sforce.console.chat.onChatCriticalWaitState(chatKey, eventHandler);
11 </script>
12</apex:page>