The GET /queue-times endpoint gets Queue Times for an account. Queue Times include information for all interactions entering queues in an account. This information includes how long the interactions were in the queues, and why they left those queues.

Headers

Header parameters in Requests (Insights Stats API) apply to this endpoint.

Authorization scopes supported:

ScopeAccess granted
statsEntire endpoint

Parameters

The endpoint accepts the following query string parameters:

start

TypeRequiredExample
DateTrue2019-12-20T15:42:39.825Z

The start date and time of the search window. Use ISO 8601 format.

If you plan to poll this endpoint, we recommend that you set start to the value returned in the upTo parameter in the previous request’s response. For more details, see the FAQ page.

end

TypeRequiredExample
DateFalse2019-12-20T15:47:39.825Z

The end date and time of the search window. Use ISO 8601 format. Default is now.

include

TypeRequiredExample
StringFalseStarted

Determines which Queue Times to include in the response.

The value dictates which values are searched for within the specified time. Possible values are:

If you plan to poll this endpoint then we recommend specifying Processed. Using Processed removes the need for any offset and ensures that you receive all data. Note, using the StartedOrEnded or Processed values can result in duplicate items being returned across search windows.

The default value is Started.

queues

TypeRequiredExample
StringFalseQueueA, QueueB, QueueC

A comma-delimited list of queue names. Default behavior is to return all queues.

queueType

TypeRequiredExample
StringFalseVirtual

Possible values are:

The default value is ACD.

Pagination

Paging parameters in Requests (Insights Stats API) apply to this endpoint.

Requests

Request queue times including processed

curl -L -X GET "https://***.api.newvoicemedia.com/stats/queue-times?start=2021-12-01T14:18:23.857Z&end=2021-12-11T14:18:23.857Z&include=Processed" \
-H "Authorization: bearer <ACCESS_TOKEN>" \
-H "Accept: application/vnd.newvoicemedia.v3+json"

Request page 2 of queue times

curl -L -X GET "https://***.api.newvoicemedia.com/stats/queue-times?start=2021-12-01T14:18:23.857Z&end=2021-12-11T14:18:23.857Z&page=2" \
-H "Authorization: bearer <ACCESS_TOKEN>" \
-H "Accept: application/vnd.newvoicemedia.v3+json"

Responses

Responses to the GET /queue-times contain a collection of Queue Time items for the specified time period. Results are sorted by the time that interactions entered queues and then queue name in ascending order.

Successful response

Success response code and parameters in Responses (Insights Stats API) apply to a successful response.

Example response

{
  "meta": {
    "page": 1,
    "count": 4,
    "pageCount": 1,
    "totalCount": 4
  },
  "items": [
    {
      "start": "2019-12-23T09:55:21.791Z",
      "interactionGuid": "016f3105-0854-43e2-9d2a-33ef02aff410",
      "medium": "Phone",
      "mediumManager": "VCC",
      "interactionPlan": "0123456789",
      "queue": "ACD1",
      "type": "ACD",
      "presentedSkills": [
        "Billing"
      ],
      "category": "Answered",
      "reason": "Delivered",
      "duration": 5189,
      "targets": null,
      "party": {
            "role": "External",
      }
    },
    {
      "start": "2019-12-23T09:55:21.791Z",
      "interactionGuid": "016f3105-0854-43e2-9d2a-33ef02aff410",
      "medium": "Phone",
      "mediumManager": "CC",
      "interactionPlan": " 0123456789",
      "queue": "VirtualQueue1",
      "type": "Virtual",
      "presentedSkills": [
        "Billing"
      ],
      "category": "Answered",
      "reason": "Delivered",
      "duration": 5189,
      "targets": {
        "targetTimeToAnswer": 5000
      },
      "party": {
            "role": "Agent",
      }
    },
    {
      "start": "2019-12-23T10:32:05.133Z",
      "interactionGuid": "016f3105-085f-4db1-be2e-b1ec61d0c6f5",
      "medium": "Phone",
      "mediumManager": "VCC",
      "interactionPlan": "0123456789",
      "queue": "ACD1",
      "type": "ACD",
      "presentedSkills": [
        "Billing"
      ],
      "category": "Breakout",
      "reason": "NoAgentsBreakout",
      "duration": 982,
      "targets": null,
      "party": {
            "role": "External",
      }
    },
    {
      "start": "2019-12-23T10:54:57.920Z",
      "interactionGuid": "016f3105-0866-463a-a9b3-16211aba205a",
      "medium": "Phone",
      "mediumManager": "VCC",
      "interactionPlan": "0123456789",
      "queue": "ACD1",
      "type": "ACD",
      "presentedSkills": [
        "Billing"
      ],
      "category": "Abandoned",
      "reason": "HangUp",
      "duration": 7044,
      "targets": null,
      "party": {
            "role": "Agent",
      }
    }
  ],
  "upTo": "2019-12-23T10:56:38.831Z",
  "latestUpdate": "2019-12-23T10:56:30.831Z"
}

Each Queue Time item in the collection contains the following parameters:

latestUpdate

After the list of Queue Time items, the response returns a latestUpdate parameter. The value of latestUpdate is the time of the most recent event that is available using the Insights Stats API.

The difference between the current time and the latestUpdate represents the delay between an event, and the corresponding statistic being available.

We aim to minimise the delay so that the Insights Stats API data is as up-to-date as possible, but the delay may increase during busy periods or service disruption. If you require near real-time statistics, the latestUpdate value may be useful so you can respond appropriately to any delay.