Newer Version Available
lightning:omniChannelStatusChanged
Response
| Name | Type | Description |
|---|---|---|
| statusId | string | The ID of the agent’s current presence status. |
| channels | string | JSON string of channel objects. |
| reason | string | The reason for the user's status change. Possible values are:
|
| statusName | string | The name of the agent’s current presence status. |
| statusApiName | string | The API name of the agent’s current presence status. |
Example
This example prints status details to the browser’s developer console when an Omni-Channel user's presence status is changed.
Component code:
1<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
2 <lightning:omniToolkitAPI aura:id="omniToolkit" />
3 <aura:handler event="lightning:omniChannelStatusChanged" action="{! c.onStatusChanged }"/>
4</aura:component>Controller code:
1({
2 onStatusChanged : function(component, event, helper) {
3 console.log("Status changed.");
4 var statusId = event.getParam('statusId');
5 var channels = event.getParam('channels');
6 var statusName = event.getParam('statusName');
7 var statusApiName = event.getParam('statusApiName');
8 console.log(statusId);
9 console.log(channels);
10 console.log(statusName);
11 console.log(statusApiName);
12 },
13})channel
The channel object contains the following properties:
| Name | Type | Description |
|---|---|---|
| channelId | string | Retrieves the ID of the service channel that’s associated with a presence status. |
| developerName | string | Retrieves the developer name of the service channel that’s associated with the channelId. |