Skip to content

Amazon Connect: CTR export including DISCONNECT REASON

0

Hello, I am trying to schedule a daily report of the Contact trace records into S3 and i need to capture the DISCONNECT REASON as well, as part of the report. I tried applying the filters and invoked the below API, https://docs.aws.amazon.com/connect/latest/APIReference/API_GetMetricDataV2.htmlHowever, I am not able to get the DISCONNECT REASON metric alone. Can you please guide how to extract this metric as well in the daily CTR report or any pointers / documentation to achieve this? Appreciate your inputs.

asked a year ago694 views

1 Answer
0

To capture the DISCONNECT REASON as part of your daily Contact Trace Records (CTR) report in Amazon Connect, you have a few options:

  1. Use Contact Trace Records (CTRs) directly: CTRs contain detailed information about each contact, including the disconnect reason. You can set up your Amazon Connect instance to stream CTRs to an Amazon Kinesis Data Stream or store them in an Amazon S3 bucket. From there, you can process the data to extract the disconnect reason along with other relevant information.

  2. Utilize Amazon Connect Analytics Data Lake: If you have access to the Amazon Connect Analytics data lake, you can use SQL queries to extract this information, including the disconnect reason, directly from the contact records stored there.

  3. GetMetricDataV2 API: While you mentioned you've tried this API, it's worth noting that the SUM_CONTACTS_DISCONNECTED metric does support filtering by DISCONNECT_REASON. However, this API is more suited for aggregated data rather than individual contact details.

For a daily scheduled report, the most straightforward approach would be to use CTRs stored in S3. Here's a general process:

  1. Ensure your Amazon Connect instance is configured to store CTRs in an S3 bucket.
  2. Set up a daily scheduled task (e.g., using AWS Lambda triggered by Amazon EventBridge) to process the CTRs from the previous day.
  3. In your processing script, parse the CTR JSON files and extract the required fields, including the disconnect reason.
  4. Compile this data into your desired report format and save it to another S3 bucket or location of your choice.

This approach allows you to capture not just the disconnect reason, but any other CTR fields you might need in your report. The disconnect reason is typically available in the CTR data, so you should be able to include it in your daily export without relying solely on the GetMetricDataV2 API.
Sources
Amazon connect - Schedule contact search report to S3 daily | AWS re:Post
Programmatically Get Call Recording Filename | AWS re:Post
GetMetricDataV2 - Amazon Connect
Amazon Connect - Last call date for each phone number | AWS re:Post

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.