TorgeirHansen | 2017-08-04 08:51:35 UTC | #1
Hi,
I'm trying to fetch the servicelevel for a set of queues, and filtering away calls that have been abandoned in less than x seconds but I'm not having much luck with the filter.
So the bit that works fine (fetching servicelevel for a list of queues within an interval) looks like this: ` var query = new AggregationQuery(); query.Interval = GetIntervalString(30); // last 30 minutes query.GroupBy = new List<AggregationQuery.GroupByEnum>() { AggregationQuery.GroupByEnum.Queueid }; query.Metrics = new List<AggregationQuery.MetricsEnum>() { AggregationQuery.MetricsEnum.Oservicelevel }; query.Filter = GetAnalyticsQueueFilter(queues); analyticsApi.PostAnalyticsConversationsAggregatesQuery(query); `
GetAnalyticsQueueFilter looks like this:
var predicate = new List<AnalyticsQueryPredicate>();
foreach (var queue in queues) { predicate.Add(new AnalyticsQueryPredicate(Dimension: AnalyticsQueryPredicate.DimensionEnum.Queueid, _Operator: AnalyticsQueryPredicate.OperatorEnum.Matches, Value: queue.Id)); }
var clausesList = new List<AnalyticsQueryClause>() { new AnalyticsQueryClause(AnalyticsQueryClause.TypeEnum.Or, predicate) };
var andPredicates = new List<AnalyticsQueryPredicate>() { new AnalyticsQueryPredicate(Dimension: AnalyticsQueryPredicate.DimensionEnum.Mediatype, _Operator: AnalyticsQueryPredicate.OperatorEnum.Matches, Value: "voice") };
return new AnalyticsQueryFilter(AnalyticsQueryFilter.TypeEnum.And, clausesList, andPredicates);
However, when I try to expand my andPredicates either include or consist only of this: new AnalyticsQueryPredicate(Metric: AnalyticsQueryPredicate.MetricEnum.Tabandon, Range: new NumericRange(10));
I get a 400/bad request: Only dimensional filters and conjunctions/disjunctions of dimensional filters are allowed
Any tips?
anon28066628 | 2017-08-04 15:40:59 UTC | #2
Please see the documentation for User-defined Views on Aggregations.
system | 2017-09-04 15:41:20 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 1646