When the gadget loads (handleUserLoad), the user will already be in not ready state. You can check the time that the user got into not ready state to determine if they had just logged in or not. If it was a long time ago, it is probably safe to assume that they refreshed the browser. If your API has a way to see if the API was already called for login, that would be even better.
2) Ready -> Not Ready
In the gadget, there is a method called handleUserChange. This method gets called when the user changes state. So it would need to have a if statement check for when the user goes from READY -> NOT_READY. If so, you call your API.
If it is just purely a logout, this would be difficult because the agent desktop will be in the process of logging out and changing the page to the login window. The timing of the agent being in logout will not be guaranteed and is not reliable. Per our separate conversation, you mentioned that the user has to go to Not Ready with a particular reason code before logging out. If so, that would work because in the same method as above in #2, you can have an additional if statement to check if agent is in not ready with that reason code and call the API.
I hope that helps!
If you would like a more 1 on 1 direct help and/or debugging, you can open a developer support ticket here: Cisco DevNet: DevNet Developer Support. We will not help you write the gadget itself, but we can help debug problems you may face.
Fun and Easy Virtual Hackathon60 Teams Win PrizesALL Participants Receive Certificate Signed by Execs
Important Note: This contest is governed by the Terms and Conditions in the document attached at the end of this page. Please review it fo...
Hi Experts, I Need one help on Cisco social miner , hope you will help us on below requirements . Many Thanks!!!!Actually, we have third party application trying to integrate in UCCE through task routing API concept .Just we need to get the agen...
I think I found another one. For brevity, I'm stripping the soap headers.First, I'm creating a new line using addLine <line>
I need to have a notepad with some saved text to pop up with an incoming call hit to our call center. I am aware of the thick client screen pop gadget, I am working on seeing we can change that to fit our needs. I am unsure to change to get this working