Category: API
Summary: Aggregate and observation metric queries require specifying metrics
Impacted APIs:
POST /api/v2/analytics/conversations/aggregates/query
POST /api/v2/analytics/evaluations/aggregates/query
POST /api/v2/analytics/flows/aggregates/query
POST /api/v2/analytics/surveys/aggregates/query
POST /api/v2/analytics/users/aggregates/query
POST /api/v2/analytics/flows/observation/query
POST /api/v2/analytics/queues/observation/query
POST /api/v2/analytics/users/observation/query
Impact: Specifying metrics as part of an aggregate or observation query will become mandatory.
Date of Change: 10/07/2020
Sorry could you confirm with a JSON example what this exactly entails? I am a total NOOB, and it would be great to see a working example even just for one metric. Could you also confirm that an SDK change will be made to reflect the above.
What will be returned if old code not specifying a metric is still run after 8.23.2020?
Thanks In Advance
This is an example JSON payload for an aggregates query:
{
"interval": "2020-06-24T23:30:00.000Z/2020-06-26T01:30:00.000Z",
"groupBy": [
"queueId"
],
"filter": {
"type": "and",
"predicates": [
{
"dimension": "mediaType",
"value": "voice"
}
]
},
"metrics": ["tAbandon", "tAnswered", "tAcd"]
}
If metrics
is either not specified or left empty, this currently returns all metrics we support.
Once this change is rolled out, queries without metrics will return a 400 error code.
Thank you. Makes Sense Now.
hi Peter,
Thanks for providing the JSON payload for aggregate query.
Just to double check here, we are using .Net SDK methods to use the aggregate query, does it mean the existing SDK will keep functioning? or that will also break?
The SDKs will reflect the change to the APIs once the changes to the APIs are released. You can continue using outdated versions of the SDK beyond that point as the request contract isn't changing, but your requests will still be subject to the mandatory property as described above. The best practice is to always use the latest SDK version.
As the date of change is set to 08/23/2020, does that mean we can only start testing after this date? Or is it already available in latest SDKs?
The change won't be made before that date; you can't start testing the change until after it's been released.
FYI: The date has been pushed back to at least 9/23 to give folks more time to adjust.
Is there an official notification / confirmation that we can point to about delaying to 9/23? We have some customers/partners with worries that the change might actually go into effect on 8/23.
This post is the official announcement. It currently states 9/23/2020 as the effective date, not 8/23.
The date has been pushed back further to 10/07/2020.
Our API data extract stopped working on the 10th. Apparently we need to specify metrics now. No one in the business has touched this C# code since 2018, I have inherited it from a predecessor and have no idea what I am doing, even having issues with which references to add to Visual Studio. I am sure I need to add some code here somewhere but unsure where. Any suggestions?
private List<AggData> doConversationAggregate(AnalyticsApi pAnalyticsAPI, String pInterval)
{
List<AggData> lTmpSummarys = new List<AggData>();
var body = new AggregationQuery();
body.Interval = pInterval;
//need to put on this filter otherwise you'll pick up webchats all mixed up with the voice data
//AnalyticsQueryFilter lFilter = new AnalyticsQueryFilter();
List<AnalyticsQueryPredicate> lPredicates = new List<AnalyticsQueryPredicate>();
AnalyticsQueryPredicate lPredicate = new AnalyticsQueryPredicate();
lPredicate.Dimension = AnalyticsQueryPredicate.DimensionEnum.Mediatype;
lPredicate.Value = "Voice";
lPredicates.Add(lPredicate);
//lFilter.Type = AnalyticsQueryFilter.TypeEnum.And;
//lFilter.Predicates = lPredicates;
AnalyticsQueryFilter lFilter = new AnalyticsQueryFilter(AnalyticsQueryFilter.TypeEnum.And, null, lPredicates);
body.Filter = lFilter;
List<AggregationQuery.GroupByEnum> lGroupBys = new List<AggregationQuery.GroupByEnum>();
AggregationQuery.GroupByEnum ltmpItem = AggregationQuery.GroupByEnum.Queueid;
lGroupBys.Add(ltmpItem);
body.GroupBy = lGroupBys;
try
{
AggregateQueryResponse result = pAnalyticsAPI.PostConversationsAggregatesQuery(body);
... etc etc etc
This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.