Generate ongoing value monitoring report

This article describes how to use the Analytics API end points to generate an ongoing value monitoring report. This report allows you to determine how predictive routing is performing in your organization. It aggregates targeted KPI results across interactions routed using predictive routing and baseline routing methods for a queue.

Following are the high-level steps for generating the report.

  1. Collect the data.
  2. Copy data from the API response into an Excel table.
  3. Build the report in Excel.

Collect the data

Query: Conversation Aggregate query

Reference on aggregate query syntax: Aggregate query syntax

Recommended interval to run monitoring: 6 cycles, 6 days each (see recommended granularity), minimal interval is 3 cycles

Recommended granularity>: 6 days (“P6D” for granularity)

Date format: ‘y-MM-ddTHH:mm:ss.SSSZ’

Organization ID: Obtain it from the Organization Settings page (for more information, see How do I find my organization ID?)

Queue ID: Obtain it from the Queue Details page (for more information, see Create and configure queues

Note: Genesys does not recommend looking at the daily report values. The more cycles the report runs, the more accurate the results.

Query examples

{
  "interval": "2021-08-10T00:00:00.000Z/2021-09-19T23:59:59.999Z",
  "granularity": "P6D",
  "groupBy": [
    "usedRouting"
  ],
  "metrics": ["tHandle", "nTransferred"],
  "filter": {
    "type":"and",
    "predicates": [
      {
        "dimension":"mediaType",
        "value":"voice"
      },
      { 
        "dimension":"originatingDirection", 
        "value":"inbound"
      },
      {
        "dimension":"direction",
        "value":"inbound"
      },
      {
        "dimension":"purpose",
        "value":"agent"
      },
      {
        "dimension":"queueId",
        "value":"24c185b0-3047-4d2e-82ea-ff5fb0ea84c7"
      },
      {
        "dimension":"usedRouting",
        "operator":"exists"
      }
    ]
  }
}

{
    "results": [
        {
            "group": {
                "mediaType": "voice",
                "usedRouting": "Predictive"
            },
            "data": [
                {
                    "interval": "2021-08-10T00:00:00.000Z/2021-08-16T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                                "count": 54
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 617462,
                                "min": 2379,
                                "count": 129,
                                "sum": 26467237
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-08-16T00:00:00.000Z/2021-08-22T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 500
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 619636,
                                "min": 1321,
                                "count": 1130,
                                "sum": 190381449
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-08-22T00:00:00.000Z/2021-08-28T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 706
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 4201281,
                                "min": 706,
                                "count": 1590,
                                "sum": 279975889
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-08-28T00:00:00.000Z/2021-09-03T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 30
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 4258097,
                                "min": 41934,
                                "count": 120,
                                "sum": 34738743
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-09-03T00:00:00.000Z/2021-09-09T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 64
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 2884174,
                                "min": 17980,
                                "count": 198,
                                "sum": 53892161
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-09-09T00:00:00.000Z/2021-09-15T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 30
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 716159,
                                "min": 35075,
                                "count": 87,
                                "sum": 16137963
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-09-15T00:00:00.000Z/2021-09-19T23:59:59.999Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 146
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 1005433,
                                "min": 42078,
                                "count": 372,
                                "sum": 70768428
                            }
                        }
                    ]
                }
            ]
        },
        {
            "group": {
                "mediaType": "voice",
                "usedRouting": "Standard"
            },
            "data": [
                {
                    "interval": "2021-08-10T00:00:00.000Z/2021-08-16T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 100
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 697563,
                                "min": 10741,
                                "count": 328,
                                "sum": 80069279
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-08-16T00:00:00.000Z/2021-08-22T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 742
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 621369,
                                "min": 7360,
                                "count": 1971,
                                "sum": 421432519
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-08-22T00:00:00.000Z/2021-08-28T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 704
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 916417,
                                "min": 10332,
                                "count": 2031,
                                "sum": 456588436
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-08-28T00:00:00.000Z/2021-09-03T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 47
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 4278075,
                                "min": 47586,
                                "count": 173,
                                "sum": 50253966
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-09-03T00:00:00.000Z/2021-09-09T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 164
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 3234167,
                                "min": 364,
                                "count": 580,
                                "sum": 162268729
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-09-09T00:00:00.000Z/2021-09-15T00:00:00.000Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 46
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 5088260,
                                "min": 20791,
                                "count": 149,
                                "sum": 49320078
                            }
                        }
                    ]
                },
                {
                    "interval": "2021-09-15T00:00:00.000Z/2021-09-19T23:59:59.999Z",
                    "metrics": [
                        {
                            "metric": "nTransferred",
                            "stats": {
                            "count": 85
                            }
                        },
                        {
                            "metric": "tHandle",
                            "stats": {
                                "max": 3310614,
                                "min": 2381,
                                "count": 319,
                                "sum": 110832037
                            }
                        }
                    ]
                }
            ]
        }
    ]
}

Copy data from API response into Excel table

  1. Create an Excel spreadsheet with the following columns: 
    • interval
    • kpiTotalOn
    • interactionCountOn
    • kpiRateOn
    • kpiTotalOff
    • interactionCountOff
    • kpiRateOff
    • kpiDifferencePercentage
  1. Locate “usedRouting” groups in the response. For example, “Predictive”, “Standard”, “Bullseye” (if the bullseye routing method is the comparison routing method selected on the queue).
  2. Copy all intervals in the response into the Interval column in the spreadsheet. For example, “2021-08-10T00:00:00.000Z/2021-08-16T00:00:00.000Z”.
  3. Copy all metrics data for each interval from all “usedRouting” groups in the response into the appropriate columns in the spreadsheet as follows:
Spreadsheet column Metrics data to copy from the response Description
interactionCountOn “count” value under the tHandle metric in the “usedRouting”: “Predictive” group Total number of interactions during the interval when predictive routing was used.
interactionCountOff Sum of “count” values under the tHandle metric in the “usedRouting”: “Standard” and “usedRouting”: “Bullseye” groups Total number of interactions during the interval when non-predictive routing was used.
kpiTotalOn:
     For AHT KPI:  “sum” value under the tHandle metric in the “usedRouting”: “Predictive” group Total of all interaction handle times during the interval when predictive routing was used.
    For Transfer % KPI: “count” value under the nTransferred metric in the “usedRouting”: “Predictive” group Total number of interactions transferred during the interval when predictive routing was used.
kpiTotalOff:
     For AHT KPI: sum of “sum” values under the tHandle metric in the “usedRouting”: “Standard” and “usedRouting”: “Bullseye” groups Sum of all interactions handle times during the interval when non-predictive routing was used.
     For Transfer % KPI: sum of “count” values under the nTransferred metric in the “usedRouting”: “Standard” and “usedRouting”: “Bullseye” groups Total number of interactions transferred during the interval when non-predictive routing was used.

Spreadsheet example

Following is an example of an Excel spreadsheet with data for the AHT KPI.

Build report in Excel

  1. Add the following formula into the corresponding kpiRateOn column: kpiTotalOn / interactionCountOn
  2. Add the following formula into the corresponding kpiRateOff column: kpiTotalOff / interactionCountOff
  3. Do one of the following:
    • For the AHT KPI, add the following formula into the kpiDifferencePercentage column to calculate the gain as a percentage:
      (kpiRateOn * 100 / kpiRateOff) – 100
      Following is an example of the resulting table:
    • For the Transfer % KPI, add the following formula into the  kpiDifferencePercentage column to calculate the gain as a difference between the on and off rate:
      (kpiRateOn – kpiRateOff) * 100