Trying to transfer a call to a queue using the JS SDK. The transferConversation method seems to wrap a POST to /api/v2/conversations/{conversationId}/participants/{participantId}/transfer. I’m sending the JSON body with to set to the queue resource URI, but getting a 400 Bad Request. The error says Invalid transfer target. Here’s the payload:
{ "to": { "resourceUri": "/api/v2/routing/queues/{queueId}" }, "type": "queue" }
Is the resourceUri format wrong?
3 Likes
Try checking the to object structure. The resourceUri needs to match the exact format Genesys expects for queue transfers, and sometimes the SDK wrapper messes up the nesting if you pass a raw string instead of the proper object type.
Here’s the minimal payload that works for me:
{
"to": {
"resourceUri": "the queue resource URI",
"id": "{queueId}"
},
"type": "queue"
}
Make sure {queueId} is the actual UUID, not the name. Also, verify the user making the request has call:transfer scope. If that still fails, drop the SDK call and hit the endpoint directly with curl. It’s usually a serialization issue with the JS SDK’s transferConversation helper. Check the network tab for the actual request body.