KBN | 2017-03-30 18:44:10 UTC | #1
Hi Team,
Is there a way to get the current presence of all the users through an API call?
Thanks.
RogierBosch | 2017-03-31 10:37:59 UTC | #2
Try GET /api/v2/users
Result has Presence and Routing Status
GET /api/v2/users
KBN | 2017-03-31 18:46:04 UTC | #3
Thanks for your reply Rogier.
I have just tried that but both Presence and Routing Status are returning null for all the users.
Any thoughts on that?
tim.smith | 2017-03-31 18:46:42 UTC | #4
Did you set them in the expand query parameter?
KBN | 2017-03-31 18:55:01 UTC | #5
OK, I have just added presence in expand and it is now working like magic.
Thanks Tim & Rogier! Appreciate your help.
KBN | 2017-03-31 19:29:05 UTC | #6
When the user is on "Out of Office" statuts, the System Presence (using /api/v2/users) is returning "Available".
The same happens using Notification and subscribing to User's presence. An "Out of Office" is returned as "Available".
Is it a bug or am I missing something here?
tim.smith | 2017-03-31 19:32:56 UTC | #7
Presence, routing status, and out of office are three different things and are set independently.
Presence:
Routing Status:
Out of Office:
KBN | 2017-03-31 19:56:35 UTC | #8
Thanks for the clarification.
However I couldn't digest one thing. If a user has set himself on "Out of Office" using the PureCloud client GUI, it takes off his Presence status e.g. Available, Away, Busy etc and sets him on "Out of Office" exclusively. So user can't be "Out of Office" and "Available" at the same time, and that is working fine visibily on the GUI side. However the same is not reflected one the API side.
If I have to report someone as Available throug API call then an "Out of Office" will raise a false flag and will present the user as being "Available".
Your thoughts on that?
tim.smith | 2017-03-31 20:04:02 UTC | #9
If you use UI to set the user to OOO, you'll notice that the user's presence is set to Available and the OOO status is active if you check them through the API. The UI just chooses to conflate Presence and OOO into one list of "presences".
KBN | 2017-03-31 20:16:33 UTC | #10
Thanks for clarifying that. Appreciate your swift responses!
system | 2017-08-28 19:33:30 UTC | #11
This post was migrated from the old Developer Forum.
ref: 1127