- Newest
- Most votes
- Most comments
Amazon Connect does provide ways to access disconnect reasons, though the availability and methods depend on your specific use case.
For outbound campaigns, Amazon Connect can provide disconnect reason details through the DisconnectReason attribute. This field contains a code indicating the method of termination.
For chat contacts, Amazon Connect has enhanced functionality that includes granular disconnect reasons in the contact record. This allows you to determine if a chat was disconnected due to specific reasons like network issues on the agent's end or customer idleness.
The DescribeContact API has been updated to provide richer contact information, including disconnect reasons. This enables you to programmatically detect disconnect reasons and take appropriate actions, such as re-queuing a chat for follow-up if it was disconnected due to a network issue.
For real-time access within a Disconnect flow, you can use system attributes. In your flow, you can access various system attributes using the "Check contact attributes" block. For the disconnect reason specifically, you would use the appropriate system attribute that contains this information.
If you need to perform more complex processing based on the disconnect reason, you could invoke a Lambda function from your Disconnect flow. However, be aware that Lambda functions invoked from Amazon Connect flows have an 8-second execution time limit. If you need to perform longer operations, you'll need to implement an asynchronous pattern where the Lambda function initiates a longer-running process and returns quickly to the flow.
This approach would involve:
- Invoking a Lambda that generates a unique ID and starts an asynchronous process
- Storing relevant information with that ID
- Having your flow continue processing while the asynchronous work completes
By leveraging these capabilities, you can access disconnect reasons in near real-time and implement appropriate routing logic or logging immediately after contact termination.
Sources
DisconnectReason - Amazon Connect
Amazon Connect adds enhanced contact information to DescribeContact API - AWS
Amazon Connect now provides granular disconnect reasons for chats - AWS
Invoke Lambda Function in Amazon Connect Limit to 8 seconds | AWS re:Post
