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.
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
HiWe have UCCX and are using cisco finesse. We have deployed popup screen feature on finesse and it is working fine, but we have a problem. It does not create new tab for each call that is handled and every new call over writes the call info with the new ...
Hi there, Suppose Agent001 is in Ready(userstate) state while Agent002 is in Not_ready(userstate) state. Agent002 makes call to Agent001,Agent001 answers the call & now they are in Talking(userstate) state...