Skip to content

GetMetricDataV2 grouping by phone number

0

We're trying to use GetMetricDataV2 to capture call center metrics (such as Service Level, AHT, etc) from Amazon Connect and trying to group the results by Queue and Phone Number.

We can do that at the Front End: Screenshot from Amazon Connect Metrics

By reading the API documentation, looks like we can't do grouping by phone number? Is that correct? Any workaround suggested other than exporting all calls data?

asked 2 years ago247 views

1 Answer
0

You are correct in your understanding that the GetMetricDataV2 API for Amazon Connect does not directly support grouping by phone number. The API documentation does not list phone number as one of the valid grouping options.

The valid groupings for GetMetricDataV2 include options like QUEUE, CHANNEL, ROUTING_PROFILE, AGENT, and various AGENT_HIERARCHY_LEVELS, among others. However, there is no specific grouping option for phone numbers.

As for workarounds, there are a few approaches you might consider:

  1. Use available groupings: You can still group by QUEUE as you mentioned, which might give you some of the information you need.

  2. Custom attribute: If it's crucial to group by phone number, you could potentially use a contact attribute to store the phone number information and then group by that attribute. The API supports grouping by custom contact attributes (like 'contact/segmentAttributes/connect:Subtype').

  3. Post-processing: You could retrieve the data without grouping by phone number, and then perform the grouping in your application after receiving the API response.

  4. Contact Trace Records (CTRs): For more detailed data including phone numbers, you might need to use Contact Trace Records. These provide comprehensive information about each contact, including the phone numbers involved.

  5. Data exports: As you suggested, exporting all call data and processing it externally might be necessary if you need extensive phone number-based analysis.

If grouping by phone number is a critical requirement for your use case, you may want to consider combining the GetMetricDataV2 API results with other data sources or reaching out to AWS Support for more specific guidance tailored to your needs.
Sources
GetMetricDataV2 - Amazon Connect
GetMetricData - Amazon Connect

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Thanks a lot for quick response. On your option #2 - Custom attribute. How could I use a contract attribute to store the phone number information? That sounds like a good workaround that I'd like to try.

  • When the call arrives you use a set attribute block to set the phone number to an attribute.

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.