
lightning:omniChannelWorkFlagUpdated event can be used to notify the agents when they raise or lower the Flag for the Supervisor assistance.
1. Create the following Lightning Aura Component.
Sample Code:
Lightning Aura Component:
<aura:component
implements="flexipage:availableForAllPageTypes"
access="global" >
<aura:handler
event="lightning:omniChannelWorkFlagUpdated"
action="{! c.onWorkFlagged }"/>
</aura:component>
Lightning Aura Component JavaScript Controller:
( {
onWorkFlagged : function(
component, event, helper
) {
let flagBool = event.getParam(
'isFlagged'
);
console.log(
"Work Flagged?",
flagBool
);
console.log(
"Updated By",
event.getParam( 'updatedBy' )
)
let showToast = $A.get(
"e.force:showToast"
);
showToast.setParams( {
title : 'Omni-Supervisor Alert',
type : flagBool ? 'success' : 'warning',
mode : 'sticky',
message : flagBool ? 'Flag Raised' : 'Flag Lowered'
} );
showToast.fire();
}
} )
2. Add the Lightning Component as the Utility Item.

Output:

