Running into a weird issue where the session handover from CXone Studio to our NICE Cognigy voicebot is failing intermittently. The trace spans in Jaeger show the HTTP call completing, but the status code is 500. The Cognigy logs show they received the payload, so it’s not a timeout.
Here’s the Studio snippet code I’m using to trigger the handover:
var cognigyProxy = GetRESTProxy("CognigyHandover");
var payload = {
"sessionId": "{{ConversationId}}",
"intent": "transfer_to_bot",
"context": { "queue": "support" }
};
var response = cognigyProxy.Post("/api/v1/intents", payload);
IF (response.StatusCode != 200) THEN
ASSIGN Error = "Handover failed: " + response.StatusCode;
ENDIF;
The CognigyHandover endpoint is configured correctly in the Studio settings. I’ve verified the OAuth token is valid by checking the trace context. The 500 error happens right after the Post call. I’m injecting the OTel context into the headers, but I suspect the payload structure might be off for the new Cognigy API version.
Does anyone have a working example of the JSON payload for the session handover? The documentation is pretty vague on the exact schema required for the context object. I’ve tried removing the context field, but that just returns a 400 Bad Request.