Hey everyone,
Running into a weird issue with a script that handles the handoff from an inbound voice interaction to our Cognigy voicebot. The flow works fine in the test environment, but in production, the ASSIGN action that triggers the handover is failing consistently.
Here is the relevant code:
ASSIGN HandoverResult = GetRESTProxy("CognigyHandover").Execute(
"POST",
"/api/v2/interactions/voice/handover",
{"interactionId": Interaction.Id, "targetBot": "SalesBot_v2"}
)
The REST Proxy CognigyHandover is configured with the correct OAuth token and base URL. When I check the logs, the response from the proxy looks like this:
{
"status": 400,
"message": "Invalid interaction context for handover",
"error_code": "HANDOVER_CTX_MISSING"
}
I’ve verified that Interaction.Id is populated correctly before the ASSIGN action. The interaction is definitely active and the agent is still in the queue. I tried adding a delay before the handover to ensure the interaction state was fully stabilized, but that didn’t help.
Also checked the Cognigy side, and they aren’t seeing any incoming requests. So it seems like CXone is rejecting the request before it even leaves the platform.
Has anyone seen this HANDOVER_CTX_MISSING error before? Is there a specific header or context field that needs to be explicitly set in the REST Proxy configuration for voice handovers? The documentation is pretty sparse on this specific error code.
Tried clearing the cache on the side, redeployed the script, same result. Feels like a timing issue or a missing context variable that isn’t being passed automatically.