Listen Salesforce Omni Channel Logout
271 views
Oct 27, 2024
ightning:omniChannelLogout can be listened in the Salesforce Lighting Aura Component to listen to the Salesforce Omni-Channel logouts. Blog Post: https://www.infallibletechie.com/2024/10/listen-salesforce-omni-channel-logout.html
View Video Transcript
0:00
Hello everyone
0:08
In this video we are going to see how to track Salesforce Omnichannel logout events
0:15
If you have a requirement where you wanted to listen to the Salesforce agents
0:19
Omnichannel Logout events, then we can make use of Lightning Omnichannel Logout event
0:29
This Omnichannel event will be fired whenever the agents logs out or even if the supervisor
0:38
logs out the agents. First we have to create this Lightning aura component
0:47
Using the aura handler I'm going to listen to this Lightning Omnichannel logout event
0:53
Whenever this event is fired this particular on logout method will be fired So here I am getting reason from the event dot from the event using the get param I going to get the parameter value for reason
1:09
so this reason will have the reason for the agent's log out and then using a
1:16
simple console dot log statement I'm just adding the reason why the agent logged
1:24
out of Salesforce Omni Channel. So based on your requirement, you can add additional logic, you can also call Apex and other
1:32
process as per your business use case. Once the Lightning aura component is created, we have to go to the console app, we have to go to
1:41
utility items, desktop only, where we can add the Lightning aura component
1:47
I have set it to start automatically so that the listener will start listening to the
1:52
logout event. So here this particular Lightning aura component is available for listening to the Salesforce Omnichannel Channel logout events So as an agent I going available in Salesforce Omni Channel for messaging
2:09
I'm a supervisor, I'm going to change the status to offline. So it will immediately listen to that event and then it will say
2:20
the reason for Omni Channel logout is Omni Supervisor Logout. the Omni Supervisor logged the agent out of Salesforce Omni Channel so we are able to track it
2:35
One more observation what I have noticed using this particular event is as an agent if
2:43
I go available in Omni Channel and then as an agent itself if I log out the reason is
2:52
undefined but it is firing that particular event so this event was definitely fired but the reason is undefined So the reason is undefined because the agent chose the offline status
3:15
It was not done by any other external factors. So that's the reason
3:20
The reason is undefined. check the video description in the video description I have given my blog post from
3:32
the blog post you should be able to get the sample lightning aura code for your
3:37
reference I hope it was helpful thank you for watching
3:58
Thank you
#Internet Software