Legacy Dev Forum Posts

 View Only

Sign Up

PatchUserQueue() returning 400

  • 1.  PatchUserQueue() returning 400

    Posted 06-05-2025 18:06

    scm_pa | 2020-02-13 21:24:21 UTC | #1

    Hello. When using PatchUserQueue() to add a newly created user to a queue it returns a 400 response.

    "{\"status\":400,\"code\":\"bad.request\",\"message\":\"The following queue member records do not exist for the agent: e4468827-6707-46f2-9bb7-18a0d8358c95:27d96498-60ab-4d33-8eac-5a2d71202384\",\"messageWithParams\":\"The following queue member records do not exist for the agent: e4468827-6707-46f2-9bb7-18a0d8358c95:27d96498-60ab-4d33-8eac-5a2d71202384\",\"messageParams\":{},\"contextId\":\"f6b5b474-1090-49f6-b10e-2b00b06c0ae8\",\"details\":[],\"errors\":[]}"

    When I create the user I'm able to successfully add skills and roles but it fails when adding the user to the queue.

    Thank you.


    tim.smith | 2020-02-14 23:13:34 UTC | #2

    Can you post the request JSON for this? I'm guessing that you might be attempting to unjoin queues the user isn't joined to, but I would need to see the request.


    scm_pa | 2020-02-17 14:08:53 UTC | #3

    I'm using the .NET API for this so the code basically just boils down to this...

    userQueue.Joined = true; UserQueue result = apiInstance.PatchUserQueue(psQueueId, psUserId, userQueue);


    anon28885283 | 2020-02-18 01:28:32 UTC | #4

    Try the RoutingAPI.PatchRoutingQueueUsers() instead. I believe the endpoint you're currently using is for when the user is a member of the queue but you can 'activate' or 'deactivate' it. Meaning you can opt in-and-out of receiving interactions from the queue even if you're still a member of it.


    scm_pa | 2020-02-18 19:14:46 UTC | #5

    Thank you. I tried that and it succeeded but when I look at the user in the Genesys Cloud environment it does not show them as a member of that queue. What I'm looking to do is when I create and add the new user is also add them as a member of the queues provided.

    Regards.


    anon28885283 | 2020-02-19 02:36:29 UTC | #6

    Sorry, it should be the POST version of that endpoint which is PostRoutingQueueUsers()


    scm_pa | 2020-02-19 21:30:29 UTC | #7

    That was it! Thank you sir.


    system | 2020-03-21 21:35:14 UTC | #8

    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: 7128