この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

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>

応答

このメソッドは非同期であるため、コールバックメソッドのオブジェクトで応答を返します。応答オブジェクトには次のプロパティが含まれます。

名前 説明
state Boolean チャットが待機時間経過状態にあるか (true)、否か (false) を示します。