Changing Bulk Users presences

Hi,
My customer would like to change user presences in bulk as part of an Evacuation app they are building.
They looked at PUT /api/v2/users/presences/bulk as a tool to do this, but there is some confusion as to how this works, and if this is the corrct API to use. When attempting to used it, with a single user, and specifying the UserId in the name field it thows a 429 rate limit error which is also confusing.
Any advice about how to use this. The API description is a little light
Cheers
Brian

Hi @Brains66
I encountered the rate limit as well. Please open a ticket with Genesys Cloud Customer Care to report this bug.

Thanks Jacob, Case raised
Are you able to confirm the usage? Does this Bulk change Users presences? Do we use the UserId in the Name feild?

Brian

That is the correct usage, to update user presences en masse. I think the name field corresponds to the user's name rather than Id, since there is no documentation that suggests otherwise. Typically the APIs use "id", "userId", or similar to indicate an id field.

Hi @Brains66 ,

You are correct here that the request contract is incorrect, it is missing a top level id field as Jacob noted which is where the userId value would belong. We have filed a ticket to correct the contract, as well as to correct the error returned in similar case as it should be a 400 not 429. You can utilize a request body similar to this to allow the call to function:

[{
   "id": "userIdHere",
   "source": "PURECLOUD",
   "primary": true,
   "presenceDefinition": {
      "id": "presenceIdHere"
   }
}]

You can specify multiple objects within the array as well. I have advised this in the support case as well so they will respond in kind. Thank you for bringing this to our attention!

-Max

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