Studio Session Handover to Agent fails with 409 Conflict on Transfer

Building a handover flow from Cognigy to a live agent. The bot handles the initial greeting, then drops the session to Studio for routing.

The issue is in the Transfer action. It’s throwing a 409 Conflict immediately after the bot says goodbye. The error payload is sparse:

{
 "code": 409,
 "message": "Resource conflict. Session is not in a valid state for transfer.",
 "status": "Conflict"
}

I’ve checked the session state via the debug log. It shows status: "connected" right before the transfer block. I’m using the standard GetRESTProxy to call the internal transfer endpoint, but maybe I’m missing a state update step?

Here’s the snippet in the Studio script:

// Get current session
ASSIGN session = GetSessionInfo()

// Attempt transfer
ASSIGN result = Transfer(session.id, "AgentSkill", "priority:1")

IF result.code == 200
 // Success path
ELSE
 // Fails here
 LogError("Transfer failed: " + result.message)
END IF

The Cognigy side is ending the session cleanly. Is there a specific API call I need to hit in Studio to mark the bot session as “completed” before the transfer? Or is this a timing issue with the websocket close event?

Also, I’m running this in the US/Central region. The API docs don’t mention a state lock for voice sessions.

{
“action”: “Transfer”,
“queueId”: “your-queue-id-here”,
“skipQueue”: false,
“reason”: “Bot handover”
}


The 409 usually means the session is still in a `connected` or `pending` state when you try to push the transfer. You can't just fire the Transfer action right after the bot speaks. The session needs to be `idle` or explicitly released first.

Try adding a small delay or a specific `End Conversation` action for the bot side before triggering the transfer. If you're using the Genesys Cloud integration in Cognigy, make sure the session is fully closed on the bot side. Sometimes the API sees the session as active because the bot hasn't hung up yet. Check your Studio flow. Are you using a `Hangup` action before the `Transfer`? That usually clears the conflict. If it's still failing, check the queue status. It might be paused or have no available agents, which can throw weird conflicts too.