onChatDeclined()
エージェントがチャット要求を却下するとコールされる関数を登録します。API バージョン 29.0 以降で使用できます。
構文
1sforce.console.chat.onChatDeclined(eventHandler:Function)引数
| 名前 | 型 | 説明 |
|---|---|---|
| eventHandler | function | チャット要求が拒否されるとコールされる JavaScript メソッド。 |
サンプルコード – Visualforce
1<apex:page >
2 <apex:includeScript value="/support/console/29.0/integration.js"/>
3 <script type="text/javascript">
4 var eventHandler = function (result) {
5 alert('A chat request with this chatKey has been declined: ' + result.chatKey);
6 }
7 sforce.console.chat.onChatDeclined(eventHandler);
8 </script>
9</apex:page>