- Newest
- Most votes
- Most comments
Step 1: Get Historical Metrics Data for Inbound and Outbound Calls Use the GetMetricData API to retrieve the CONTACTS_HANDLED and HANDLE_TIME metrics, filtering by the ContactType (inbound or outbound).
Step 2: Calculate Total Handle Time Use the following formula to calculate the total handle time:
Total Handle Time = Average Handle Time (HANDLE_TIME) * Number of Contacts Handled (CONTACTS_HANDLED)
Example of the Request Payload for the GetMetricData API
You can request both HANDLE_TIME and CONTACTS_HANDLED in a single API call. Here’s an example request:
{
"InstanceId": "your_instance_id",
"StartTime": "2023-09-01T00:00:00Z",
"EndTime": "2023-09-30T23:59:59Z",
"Filters": {
"Channels": ["VOICE"],
"Queues": ["your_queue_id"]
},
"Groupings": ["QUEUE"],
"HistoricalMetrics": [
{
"Name": "HANDLE_TIME",
"Statistic": "AVG",
"Unit": "SECONDS"
},
{
"Name": "CONTACTS_HANDLED",
"Statistic": "SUM",
"Unit": "COUNT"
}
]
}
In the response, you’ll get both metrics (HANDLE_TIME and CONTACTS_HANDLED). You can then use the formula to calculate the total handle time for inbound and outbound calls.
Make sure to apply filters for ContactType in your request or use data from your CTR records (as you mentioned earlier) to differentiate between inbound and outbound calls. This way, you can ensure you’re calculating the total for each call type separately.
Relevant content
asked a year ago
asked a year ago
- AWS OFFICIALUpdated 7 months ago

Hello, thank you for your response. I was working on step 2, as I’m implementing my solution using the Amazon Connect Historical Metrics API. However, I'm encountering an issue: it's not possible to retrieve the total sum of handle time for inbound or outbound contacts. The HANDLE_TIME metric only provides the average, not the total sum.