eparis | 2023-01-25 20:33:02 UTC | #1
Hello.
I need to be able to detect when a Genesys Cloud user logouts, so I can remove a flag in a database related to that user whenever they are offline.
Currently we have an integration with AWS EventBridge that listens to the presence of the users, and when the notification says a user's system presence equals OFFLINE: it performs the removal action.
During testing, we noticed that once a user logged out, it would take 1-2 minutes to receive a notification that said the user's presence was OFFLINE.
But now that we moved this to production, there have been a couple of instances when the removal action has fired off in inconsistent ways, particularly when a user logs out and relogs in fast (because they want to restart the application due to weird behavior). One time it immediately sent an 'OFFLINE' notification, another time it sent 'OFFLINE' after 1 minute, then another time it never sent an 'OFFLINE' notification for the user.
Is there something that can explain that behavior? How does the user presence notifications work?
Appreciate the help, thank you.
tim.smith | 2023-01-24 00:20:44 UTC | #2
Everything you're describing seems likely to be correct. Keep in mind that Genesys Cloud doesn't have any concept of "logged in" or "logged out" because there isn't a 1:1 relationship between a user and a user's session; using any particular app doesn't have a direct relationship to their presence. Users can, and very often do, have multiple access tokens valid at the same time. But users still only have a singular presence that isn't directly related to any of those access tokens.
What you're observing can be explained by the special server-side presence cleanup feature within Genesys Cloud. This feature is tied explicitly to our out of the box UI. When the UI closes normally, you should see the user changed to offline very quickly as the UI was able to notify the server that it was closing. But the browser doesn't always succeed in sending that message for various reasons. The server-side feature will eventually set the user to offline when it loses communication with the UI app for a period of time. This is the cause of the noticeably delayed offline presence events.
If you are seeing behavior that you feel isn't likely explained by this, please open a case with Genesys Cloud Care to investigate specific instances of delayed notifications.
eparis | 2023-01-31 22:43:09 UTC | #3
Hello.
I understand the explanation, but it does seem like the behavior that's causing trouble is something else. The "OFFLINE" notification of a user is being sent in cases where the user didn't logout at all (and it's impossible that someone else is using their account, due to company policies). We even found a scenario through screen recordings where we could see that an "OFFLINE" notification was sent while the user was still interacting in the app with 3 customers on-queue. When we looked up the user activity detail it also registered a logout, but in reality, the user never physically logged out.
It's happening around once a day, in an operation of 1000+ agents. I'll likely open a case to investigate it further.
Thank you for the quick answer! Have a nice day.
John_Carnell | 2023-02-07 13:30:35 UTC | #4
This post was migrated from the old Developer Forum.
ref: 18100