Flow Aggregate query
Flow Aggregate queries show a high-level summary of metrics derived from IVR flows. The query data includes (but is not limited to) common KPIs pertaining to flow interactions such as time spent in a flow and flow outcomes.
Flow aggregate query
A flow aggregate query summarizes overall flow metrics during a given interval. This is where you get a higher-level view of one or more interactions and not the individual cradle-to-grave style details (the conversation detail record query is the place to go if that's what you're looking for).
Metrics
Metric | Description | Preview |
Dimensions
Dimension | Type | Description | Preview |
Metrics and dimensions that are marked as preview may not have been released yet and are subject to change at any time without notice.
The syntax of this query conforms to the general template for aggregate queries.
Example query
This query is asking for a few specific metrics (time in flow time, time in flow outcom) for all voice interactions between Feb 2, 2017 13:00 and Feb 3, 2017 partitioned into 12 hour sized buckets. The results of this query are then partitioned into subgroups by flow.
{
"interval": "2017-02-02T13:00:00.000Z/2017-02-03T13:00:00.000Z",
"granularity": "PT12H",
"groupBy": [
"flowId"
],
"metrics": [
"tFlow",
"tFlowOutcome"
],
"filter": {
"type": "and",
"predicates": [
{
"dimension": "mediaType",
"value": "voice"
}
]
}
}
Example response
For each tuple of media type and flow, a list of metrics is returned for each interval queried for. Since the original query asked for a full day broken into 12 hour partitions, we see two intervals returned below. Within each, we see metrics for each. Each of these metrics are composed of stats which show how many milliseconds were attributed to that metric. In the first example of tFlow below, we see that the maximum single measure of time in flow in that group+interval was 36374 milliseconds. We also see that there were 3 instances of time in flow, and the value of all three of those summed up equals 36374. The mean ("average") time in flow this example (sum divided by count) is ~12,125 milliseconds, or approximately 12 seconds.
{
"results": [
{
"group": {
"mediaType": "voice",
"flowId": "09efbb9d-85c5-4ebb-bcdf-9a474a643f4a"
},
"data": [
{
"interval": "2017-02-02T13:00:00.000Z/2017-02-03T01:00:00.000Z",
"metrics": [
{
"metric": "tFlow",
"stats": {
"max": 36374,
"count": 3,
"sum": 80565
}
}
]
}
]
},
{
"group": {
"mediaType": "voice",
"flowId": "7ad89ce2-9dc0-48b7-8408-a4cc71fe85c4"
},
"data": [
{
"interval": "2017-02-02T13:00:00.000Z/2017-02-03T01:00:00.000Z",
"metrics": [
{
"metric": "tFlow",
"stats": {
"max": 178673,
"count": 152,
"sum": 27155033
}
}, {
"metric": "tFlowOutcome",
"stats": {
"max": 85690,
"count": 13,
"sum": 160264
}
}
]
}
]
}
]
}