- Newest
- Most votes
- Most comments
Yes, you can pull historical Contact Trace Records (CTR) data from Amazon Connect using several methods:
- Using Amazon Kinesis Data Streams:
- Configure your Amazon Connect instance to stream CTR data to a Kinesis Data Stream
- Use the AWS SDK (like Boto3 for Python) to consume the data from the stream
- Each record contains detailed contact information including recording locations
- Querying CTR data stored in Amazon S3:
- Ensure CTRs are being stored in an S3 bucket
- Use Amazon Athena to run SQL queries directly against this data
- Write queries to extract specific information like phone numbers, timestamps, call durations, etc.
- Amazon Connect Analytics Data Lake:
- If you have access to the Connect Analytics data lake, you can use SQL queries to extract CTR information
- This allows for more complex analysis and reporting
For example, you could write an Athena SQL query to separate inbound and outbound calls:
SELECT
InitiationMethod,
SUM(AgentInteractionDuration) as TotalCallDuration
FROM
"your_ctr_table"
WHERE
InitiationMethod IN ('INBOUND', 'OUTBOUND')
GROUP BY
InitiationMethod
Note that there are time limitations for historical data access. According to documentation, the GetMetricDataV2 API allows you to retrieve historical metrics for the last 3 months. For data older than that, you would need to ensure you've been storing the CTR data in S3 or another persistent storage solution.
Sources
Programmatically Get Call Recording Filename | AWS re:Post
Downloading yearly call data from Amazon Connect | AWS re:Post
Sum total time of inbound / outbound calls | AWS re:Post
Currently, there is no direct API available for accessing complete historical CTR data from Amazon Connect. However, for accessing complete CTR data, you would need to set up CTR streams through Amazon Kinesis Data Firehose or Amazon Kinesis Data Streams to capture and store the data in Amazon S3 buckets. This approach allows you to stream your Contact Trace Records to S3 in real-time as contacts are processed through your Connect instance [1]. You could then query the data using Athena.
