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:omniChannelWorkFlagUpdated
Response
| Name | Type | Description |
|---|---|---|
| workId | string | The ID of a work item with the updated flag. |
| isFlagged | Boolean | Specifies whether the flag is raised or not. |
| message | string | Optional. A message associated with changing the flag. |
| roleUpdatedBy | string | The role of the user who triggered this flag change. The value is AGENT or SUPERVISOR. |
| updatedBy | string | The ID of the user who triggered this flag change. |
Example
This example prints a line to the browser’s developer console when an agent's work item flag is raised or lowered.
Component code:
1<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
2 <lightning:omniToolkitAPI aura:id="omniToolkit" />
3 <aura:handler event="lightning:omniChannelWorkFlagUpdated" action="{! c.onChannelWorkFlagUpdated }"/>
4</aura:component>Controller code:
1({
2onChannelWorkFlagUpdated : function(cmp, evt, hlp) {
3 var workId = evt.getParam('workId');
4 var message = evt.getParam('message');
5 var isFlagged = evt.getParam('isFlagged');
6 console.log("WorkFlag event");
7 console.log(" workId : "+ workId);
8 console.log(" isFlagged : "+ isFlagged);
9 console.log(" message : "+ message);
10}
11})