Add Queues for a user

Hi All,

Is it possible to add set of Queues for a user using API?

POST /api/v2/routing/queues/{queueId}/members
I tried the above POST to add users to a Queue, but we are looking to assign multiple queues(bulk) for a user(user ID) using API.

Any idea please?

Regards,
Bala

PATCH /api/v2/users/{userId}/queues

Thanks Tim!!

Based on this discussion topic

I think from Users API we can only do Join or unjoin a set of queues for a user?
is it also possible to assign set of queues first time for a user?

Regards,
Bala

I'm not sure what you mean. The request should work the first time as well as any time thereafter to modify the list.

We tried with the below body using PATCH /api/v2/users/{userId}/queues
When I tried to add a queue, i get 200 ok but the new queue is not actually added , but i can able to join or unjoin existing queues assigned to that user by setting true or false..
Could you please clarify the body for adding queue

[
{
"id": "xxxxxxxxxxx",
"joined": true
}
]

Regards,
Bala

1 Like

Sorry, I need to set some terminology straight. There are two things going on here that are getting mixed up.

Queue membership - being a member of a queue associates a user with a queue. The only way to change queue membership is via modifying the queue using POST /api/v2/routing/queues/{queueId}/members.

Joining a queue - after the pre-condition of being made a member of the queue, a user can join or unjoin the queue. Joining a queue is only possible for queues for which the user is already a member. This can be accomplished using any of the following:

1 Like

To address these points directly, please open a case with Genesys Cloud Care to report both of these issues:

  1. The API is accepting invalid requests and returning success. This is a bug as it should return a 400 bad request error when you send it requests that are unable to be handled. It's currently silently failing.
  2. Your guess of what to put in that request seems reasonable, but the API documentation is absolutely wrong for PATCH /api/v2/users/{userId}/queues. It documents that you must provide an array of UserQueue objects and can set properties like dateCreated, bullseye, callingPartyName, etc., but fails to document the id of the queue, which is the most important property. This is a bug as it appears the API endpoint is annotated with an inappropriate class for the request.
1 Like

Hi Tim - Thanks for the detail clarification.

Regards,
Bala