Indicates that an agent has logged out of Omni-Channel.
Response
| Name | Type | Description |
|---|---|---|
reason |
string | The reason why the agent is logged out. Possible values are:<ul><li>DuplicateLogin</li><li>DuplicateLoginInSameBrowser</li><li>MaintenanceLogout</li><li>OmniSupervisorLogout</li></ul> |
Example
This example prints a line to the browser’s developer console when an Omni-Channel user logs out of Omni-Channel.
Component code:
<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
<lightning:omniToolkitAPI aura:id="omniToolkit" />
<aura:handler event="lightning:omniChannelLogout" action="{! c.onLogout }"/>
</aura:component>
Controller code:
({
onLogout : function(component, event, helper) {
console.log("Logout success.");
var reason = event.getParam('reason');
console.log(reason);
},
})