Daniel_Grosso | 2018-06-04 09:18:42 UTC | #1
Greetings,
I've realized that, when on PureCloud web client, once we close the browser even if the session was opened, after a while the user gets logged off automatically and it's phone is released. We need to replicate this behavior on our custom front end where are using the REST api.
Is it possible?
Thanks in advance.
Regards, Daniel
tim.smith | 2018-06-04 13:43:51 UTC | #2
Daniel_Grosso, post:1, topic:2943
after a while the user gets logged off automatically
There isn't a concept of logged in/out in PureCloud. This is the user's presence being set to Offline.
You aren't able to tap into the built-in functionality to auto-change the user's presence or change their station. However, you can do this with your own customizations. You can create a service that implements your own logic to determine when to change a user's presence (PATCH /api/v2/users/{userId}/presences/{sourceId} and unset an associated station (DELETE /api/v2/stations/{stationId}/associateduser.
Daniel_Grosso | 2018-06-04 13:58:32 UTC | #3
Hello Tim.
Thank u for answering.
We r planning to do that when the user logs out our front end. So, whenever a user clicks logout on our front-end we will call the api methods to change the user presence and release the phone.
The problem is when the user closes the browser without doing logout. The phone will be stuck on that user and next shift's user will have its phone blocked. Somehow PureCloud's web client detects inactivity and does the magic automatically.
Regards, Daniel
tim.smith | 2018-06-04 13:59:25 UTC | #4
Daniel_Grosso, post:3, topic:2943
Somehow PureCloud's web client detects inactivity and does the magic automatically.
It does not. This is a back end service that does this. My suggestion was for you to replicate this process with your own service.
Daniel_Grosso | 2018-06-04 14:00:26 UTC | #5
Ok Tim. Got it.
Regards, Daniel
system | 2018-07-05 14:00:28 UTC | #6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 2943