Average Hold Time

Please could you help me out,

I’m trying to get Average Hold Time for each queue a day, currently my app executes /api/v2/analytics/conversations/aggregates/query and I get "metric": "Theld"

For my report I do the following operation to get the average in hh:mm:ss **4294461**/1000 / **15** = 286.2974 --> **00:04:46**
But in “Queue Metrics Daily Report” is not even close to that (00:07:09) my question is how should I calculcat Avg Hold time?
{
  "results": [
    {
      "group": {
        "mediaType": "voice",
        "queueId": "18b9641e-409c-4003-83c4-28507904a6d9"
      },
      "data": [
        {
          "interval": "2017-01-29T04:00:00.000Z/2017-01-30T04:00:00.000Z",
          "metrics": [
            {
              "metric": "Tacw",
              "stats": {
                "max": 120000,
                "min": 2000,
                "count": 32,
                "sum": 2089000
              }
            },
            {
              "metric": "Tacd",
              "stats": {
                "max": 3569440,
                "min": 580,
                "count": 32,
                "sum": 4799622
              }
            },
            {
              "metric": "Thandle",
              "stats": {
                "max": 2631386,
                "min": 17772,
                "count": 32,
                "sum": 14295138
              }
            },
            {
              "metric": "Theld",
              "stats": {
                "max": 1215278,
                "min": 1268,
                "count": 15,
                "sum": 4294461
              }
            },
            {
              "metric": "Ttalk",
              "stats": {
                "max": 575088,
                "min": 48,
                "count": 46,
                "sum": 7911677
              }
            },
            {
              "metric": "Tabandon",
              "stats": {
                "max": 1470679,
                "min": 21573,
                "count": 24,
                "sum": 6454454
              }
            },
            {
              "metric": "Noffered",
              "stats": {
                "count": 56
              }
            },
            {
              "metric": "Tanswered",
              "stats": {
                "max": 3569392,
                "min": 575,
                "count": 32,
                "sum": 4799122
              }
            }
          ]
        }
      ]
    }
  ]
}

I see that your interval starts and ends at 4 am UTC, which is 11 pm EST the previous day. So your interval is actually 2017-01-28T23:00:00.000-0700/2017-01-29T23:00:00.000-0700 in EST. The screenshot on the report doesn't indicate the configured timezone. Can you verify that your report and API request are using the same intervals in the same timezone?

Thank you Tim,
You were right "Queue Metrics Daily Report" has -5:00, I generated again (wih -4:00 offset) but It's has the same avg hold time ( 00:07:09 )

Thanks for checking; wanted to rule that out. Can you post the body of your query? I'm interested to see what filter criteria you are using.

I believe your issue is that you need to use tHeldComplete instead of tHeld in your calculation.

edit: The difference between the two, aside from the fact that the report uses tHeldComplete, is that tHeldComplete is calculated based on the sum hold time per interaction and tHeld is based on each individual hold event. Another way to explain it is that if you have two conversations and each is placed on hold twice, tHeldComplete will have a count of 2 and tHeld will have a count of 4.

Thank you very much, tHeldComplete is the correct one
4294461/1000 / 10 = 429.4461 --> 00:07:09

1 Like