I want to know when a user logs in or out

・Premise
I have a WebSocket connection to Genesys Cloud to get information.
The API used for WebSocket connections are described below.

  1. Create a channel
    【API】
    /api/v2/notifications/channels

【request Body】
{}

【response Body】
URI:wss://streaming.mypurecloud.jp/channels/
Channel ID:

  1. Subscribe to a Topic
    【API】
    /api/v2/notifications/channels/{channelId}/subscriptions
    channelId:

【request body】
The following topics for all users:
v2.users.{id}.activity v2.users.{id}.conversations.calls
v2.users.{id}.presence v2.users.{id}.routingStatus

【response body】
{}

・Question
Is it possible to receive the event via WebSocket when the user logs in or out?

Hello,

"There isn’t a concept of “logged in” or “logged out” in PureCloud. Generally, you can consider the presence “Offline” to be when the user is not using PureCloud and any other presence means they are using PureCloud."
Please, see this post

In your scenario, you could leverage the "v2.users.{id}.presence" topic and consider the user as:
-Logging in when the presence status changes from Offline to another state.
-And logging out when the presence status changes to Offline.

Note: the presence status will be changed to Offline when the users select "Logout" from Genesys Desktop, or when the user exits/closes the Genesys Desktop web page or client (the presence update occurs few seconds after the Genesys Desktop web app is closed).

Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.