CXone Studio: Session Handover to Agent failing with 400 Bad Request

Trying to pass a session from a Cognigy voicebot to a live agent using the CXone Studio Session Handover action. The bot completes, but the handover fails immediately.

Using GetRESTProxy to call /api/v2/icm/session-handovers. The payload looks valid:

{"sessionId": "abc-123", "targetGroup": "sales"}

But I get a 400 error saying ‘Invalid session state’. I’ve checked the logs and the session is active. Anyone seen this?

Check your target group ID. You’re passing “sales” as a string, but the API expects the actual UUID of the group. Try fetching the group ID first using the Search API or hardcode it if it’s static.

{"sessionId": "{{session.id}}", "targetGroup": "550e8400-e29b-41d4-a716-446655440000"}

Also, make sure the session is actually in a state that allows handover.