- Newest
- Most votes
- Most comments
Based on Amazon Connect's architecture, when an agent sets their status to Offline while handling an active chat, the system enters a "Next status: Offline" state. In this state, Amazon Connect stops routing new contacts to the agent but allows them to complete their current active chats. Once all their slots are cleared, the system automatically sets their status to Offline.
For your specific requirement to intervene earlier and transfer the chat when an agent goes Offline, here's what's supported:
Native Approach:
The recommended way to handle chat transfers when an agent disconnects is through disconnect flows. When an agent leaves a chat (which would occur when they go Offline and the chat ends), you can configure a disconnect flow that:
- Uses a Set disconnect flow block in your inbound flow to specify which disconnect flow should run when the agent disconnects
- In the disconnect flow, add a Wait block with two branches:
- Customer return: Routes the customer when they send a message - you can route them to the previous queue, a new queue, or back to the original agent
- Timeout: Handles the scenario if the customer doesn't respond within a specified time
This approach allows the chat to continue and be reassigned rather than being terminated. The total duration of the chat, including multiple Wait blocks, cannot exceed 7 days.
For Your Use Case:
Since you want to transfer the contact before it naturally ends, using contact attributes combined with flow-based routing is indeed the most viable approach within Amazon Connect's current capabilities. You can:
- Use your Lambda function (triggered by Kinesis Agent Events) to update contact attributes when detecting NextAgentStatus = Offline
- Have your contact flow logic check these attributes and trigger appropriate routing decisions
- Use the disconnect flow mechanism to handle the transfer once the agent actually disconnects
Important Note:
There isn't a direct API to forcibly transfer an active chat contact away from an agent in real-time while they're still connected. The disconnect flow approach is designed to handle the transition gracefully after the agent disconnects, which aligns with Amazon Connect's asynchronous chat model where customers can resume conversations.
The contact attributes + flow-based routing approach you're exploring is the appropriate method for implementing custom logic around agent state changes in chat scenarios without abruptly disconnecting customers.
Sources
The chat/SMS channel in Amazon Connect - Amazon Connect
Set your "Next status" in the Contact Control Panel (CCP) - Amazon Connect
Sample disconnect flow in Amazon Connect - Amazon Connect
