Building a bot flow in Cognigy that needs to route users to specific CXone queues based on intent confidence. The bot handles the initial interaction, then needs to hand off to a live agent in CXone via a webhook trigger.
The issue is mapping the Cognigy output to the CXone REST API for creating a conversation. I’m hitting the /api/v2/conversations endpoint with a POST, but the routing object isn’t sticking. The conversation gets created, but it lands in the default queue, not the one derived from the bot’s intent.
Here’s the JSON payload I’m sending from the Cognigy action:
{
"to": {
"id": "target-queue-id-from-intent",
"type": "queue"
},
"from": {
"id": "bot-user-id",
"type": "user",
"externalId": "cognigy-session-123"
},
"routing": {
"skillSelection": "manual",
"queueId": "target-queue-id-from-intent"
}
}
The API returns a 201 Created, which is good. But checking the conversation details immediately after, the routing.queueId is null or falls back to the user’s default. The to.id seems to be ignored if routing.queueId isn’t explicitly set and valid.
I’ve verified the target-queue-id-from-intent is a valid UUID for a queue in CXone. The bot is running in the same region. Is there a specific header or additional field required to force the queue assignment during creation? Or does the webhook need to be a PATCH to an existing conversation instead of a POST?
Also, the Cognigy webhook node expects a specific response format. If I return the conversation ID from CXone, how do I structure that so the bot can use it for subsequent state updates? Currently, I’m just returning the raw JSON from CXone, and the bot logs show a parsing error on the next step.
Any pointers on the exact payload structure for dynamic queue assignment?