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:omniChannelWorkAccepted
Indicates that an agent has accepted a work
assignment, or that a work assignment has been automatically accepted.
Response
| Name | Type | Description |
|---|---|---|
| workItemId | string | The ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a workId when it’s assigned to an agent. |
| workId | string | The ID of a work assignment that’s routed to an agent. |
Example
This example prints work details to the browser’s developer console when an Omni-Channel user accepts a work assignment, or when a work assignment is automatically accepted.
Component code:
1<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
2 <lightning:omniToolkitAPI aura:id="omniToolkit" />
3 <aura:handler event="lightning:omniChannelWorkAccepted" action="{! c.onWorkAccepted }"/>
4</aura:component>Controller code:
1({
2 onWorkAccepted : function(component, event, helper) {
3 console.log("Work accepted.");
4 var workItemId = event.getParam('workItemId');
5 var workId = event.getParam('workId');
6 console.log(workItemId);
7 console.log(workId);
8 },
9})