Here is the Studio snippet I’m using to pass the call over to our NICE Cognigy voicebot instance. It’s a standard REST proxy call to the CXone Session Handover API.
SetRESTProxy("handover_proxy")
SetRESTProxy("handover_proxy", "method", "POST")
SetRESTProxy("handover_proxy", "url", "https://api.nice-incontact.com/icapi/api/v2/session/handover")
SetRESTProxy("handover_proxy", "header:Content-Type", "application/json")
SetRESTProxy("handover_proxy", "body", "{
\"sessionId\": \"<Session ID>\",
\"targetBotId\": \"cognigy-bot-001\",
\"transferType\": \"blind\"
}")
Assign("response_code", GetRESTProxy("handover_proxy", "statusCode"))
Assign("response_body", GetRESTProxy("handover_proxy", "body"))
The issue is intermittent but annoying. When I test this locally in the Studio designer, it works fine. But in production, about 30% of the time I get a 502 Bad Gateway back from the proxy. The response_body just contains a generic error message from the load balancer, nothing useful from Cognigy.
I’ve checked the Cognigy logs and they don’t show any incoming requests for those failed attempts, which makes me think the request isn’t even reaching the bot engine. Is there a timeout setting on the SetRESTProxy call that I’m missing? Or is this a known issue with the Session Handover API when the bot is under load?
I’m using the standard CXone tenant endpoint. No custom headers other than Content-Type. We’re on the latest Studio version. Anyone else hit this wall?