onChatCriticalWaitState()
Registers a function to call when a chat becomes critical to answer or a waiting chat
is answered. Available in API version 29.0 or
later.
Syntax
sforce.console.chat.onChatCanceled(chatKey:String, callback:Function)
Arguments
Name | Type | Description |
---|---|---|
chatKey | String | The chatKey associated with the chat for which the critical wait state has changed. |
callback | function | JavaScript method called upon completion of the method. |
Sample Code–Visualforce
<apex:page >
<apex:includeScript value="/support/console/64.0/integration.js"/>
<script type="text/javascript">
var eventHandler = function (result) {
alert('This chat has reached a critical wait');
}
//Get the value for 'myChatKey' from the sforce.console.chat.getDetailsByPrimaryTabId() or other chat methods.
//These values are for example purposes only
var chatKey = 'myChatKey';
sforce.console.chat.onChatCriticalWaitState(chatKey, eventHandler);
</script>
</apex:page>