dnivelad | 2017-01-19 16:49:29 UTC | #1
When I use /api/v2/analytics/conversations/aggregates/query
with the metrics tAbandon and tAnswered like below json example I get results back. If I replace the metrics list with tWait I get a 400 error stating "tWait is not available because the query cannot be simplified to a set of entity selections." How can I change the query to avoid getting the 400 error? (I've chosen not to display the value of the queue id in the json)
{
"interval": "2017-01-19T07:00:16Z/2017-01-19T10:16:16Z",
"groupBy": [
"queueId"
],
"granularity": "PT300M",
"metrics": [
"tAbandon","tAnswered"
],
"filter": {
"type": "and",
"predicates": [
{
"dimension": "queueId",
"value": "queueID"
},
{
"dimension": "mediaType",
"value": "voice"
}
]
}
}
tim.smith | 2017-01-19 17:34:31 UTC | #2
I've checked with the analytics team and there are three caveats to retrieving the tWait metric:
- You must specify the queueId values you want in the predicate filters
- You must group by queueId
- The interval must be evenly divisible by the granularity
dnivelad | 2017-01-19 18:32:38 UTC | #3
Thanks Tim!
Corrected the query according to the 3rd requirement specifying interval 2017-01-19T07:00:00Z/2017-01-19T15:00:00Z and granularity PT4H or PT8H
both worked fine for tWait
system | 2017-08-28 19:30:16 UTC | #4
This post was migrated from the old Developer Forum.
ref: 810