Cognigy webhook payload mapping to CXone routing attributes failing silently

I’m trying to get our Cognigy chatbot to hand off to the correct CXone queue based on the intent confidence score, but the routing isn’t triggering as expected. I’ve set up a webhook in Cognigy to hit our internal middleware, which then calls the CXone API to update the participant attributes before the transfer happens.

The issue seems to be in how the JSON payload is structured when it hits the CXone endpoint. I’m using the POST /api/v2/analytics/conversations/details/query endpoint to verify the attributes are sticking, but they’re either missing or malformed. Here’s the payload I’m sending from the middleware:

{
 "conversationId": "abc-123-xyz",
 "attributes": {
 "cognigy_intent": "billing_issue",
 "confidence_score": 0.92,
 "routing_queue": "billing_support"
 }
}

I’m getting a 200 OK from the CXone API, so the request isn’t failing outright. But when I check the conversation details in the UI or via the query API, the cognigy_intent attribute isn’t showing up in the customAttributes array. It’s like CXone is ignoring the nested object structure.

I’ve tried flattening the attributes:

{
 "conversationId": "abc-123-xyz",
 "attributes": {
 "cognigy_intent": "billing_issue"
 }
}

Still no luck. The documentation says custom attributes should be passed as key-value pairs, but I’m not sure if the webhook integration requires a specific format or if I need to use a different endpoint entirely. I’ve checked the OAuth scopes and they include conversation:write and analytics:read, so permissions shouldn’t be the issue.

Has anyone successfully mapped Cognigy intent data to CXone routing attributes? I’m stuck on whether the problem is in the payload structure or the way CXone is parsing the incoming webhook data. I’ve also tried using the PUT /api/v2/conversations/{conversationId}/participants/{participantId} endpoint to update attributes directly, but that gives me a 400 Bad Request error saying the attribute key is invalid. Not sure what keys are actually allowed in this context. Any pointers would be appreciated.