Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
lightning:omniChannelWorkloadChanged
Indicates that an agent’s workload has changed.
This includes receiving new work items, declining work items, and closing items in the
console. It also indicates that there has been a change to an agent’s capacity or
presence configuration, or that the agent has gone offline in the Omni-Channel
utility.
Response
| Name | Type | Description |
|---|---|---|
| configuredCapacity | number | The configured primary capacity for the agent. |
| previousWorkload | number | The agent’s primary workload before the change. |
| newWorkload | number | The agent’s new primary workload after the change. |
| configuredInterruptibleCapacity | number | The configured interruptible capacity for the agent. |
| previousInterruptibleWorkload | number | The agent’s interruptible workload before the change. |
| newInterruptibleWorkload | number | The agent’s new interruptible workload after the change. |
Example
This example prints workload details to the browser’s developer console when an agent’s workload changes.
Component code:
1<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
2 <lightning:omniToolkitAPI aura:id="omniToolkit" />
3 <aura:handler event="lightning:omniChannelWorkloadChanged" action="{! c.onWorkloadChanged }"/>
4</aura:component>Controller code:
1({
2 onWorkloadChanged : function(component, event, helper) {
3 console.log("Workload changed.");
4 var configuredCapacity = event.getParam('configuredCapacity');
5 var previousWorkload = event.getParam('previousWorkload');
6 var newWorkload = event.getParam('newWorkload');
7 console.log(configuredCapacity);
8 console.log(previousWorkload);
9 console.log(newWorkload);
10 },
11})