onAgentStateChanged()
オンラインから退席中への変更など、エージェントがチャットの状況を変更するとコールされる関数を登録します。API バージョン 29.0 以降で使用できます。
構文
1sforce.console.chat.onAgentStateChanged(eventHandler:Function)引数
| 名前 | 型 | 説明 |
|---|---|---|
| eventHandler | function | エージェントのチャットの状況が変化するとコールされる JavaScript メソッド。 |
サンプルコード – Visualforce
1<apex:page>
2 <apex:includeScript value="/support/console/54.0/integration.js"/>
3 <script type="text/javascript">
4 var eventHandler = function (result) {
5 alert("Agent's State has Changed to: " + result.state);
6 };
7 sforce.console.chat.onAgentStateChanged(eventHandler);
8 </script>
9</apex:page>