The GET /wfm/queue-activity endpoint gets information about activity in queues within an account. This includes how long the interactions were in the queues, why they left those queues, and the total connected and wrap times for agents that handled the interactions after they left the queue.

Agent handle time metrics for queued callbacks are not available. This is because the interaction that enters and leaves the queue, with media type Phone Callback, is a different interaction to the call that is delivered to the agent.


Most URLs in the example code use the following values:

Headers

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

Authorization scopes supported:

Scope

Access granted

statsEntire endpoint

Parameters

The endpoint accepts the following query string parameters:

start

TypeRequiredExample
DateTrue2021-09-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 (Insights Stats API).

end

TypeRequiredExample
DateFalse2021-09-20T15:47:39.825Z

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

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 All.

Pagination

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

Requests

Request queue activities including processed

curl -L -X GET "https://***.api.newvoicemedia.com/stats/wfm/queue-activity?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 activities

curl -L -X GET "https://***.api.newvoicemedia.com/stats/wfm/queue-activity?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"

Request queue activity for queues QueueA and QueueB

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

Request queues for virtual queues only

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

Responses

Responses to the GET /wfm/queue-activity return a collection of queue activity items for the specified time period. 

A queue activity item will be returned if any of the following times fall within the search window defined by the start and end parameters:

Results are sorted by the time that interactions entered queues and then by queue name in ascending order.

Successful response

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

Example response

{
  "meta": {
    "page": 1,
    "count": 5,
    "pageCount": 1,
    "totalCount": 5
  },
  "items": [
    {
      "queueName": "sales queue",
      "queueType": "ACD",
      "enteredQueue": "2022-07-19T13:06:18.817Z",
      "queueDuration": 8861,
      "queueExitCategory": "Answered",
      "queueExitReason": "Delivered",
      "completedAt": "2022-07-19T13:06:50.060Z",
      "interactionGuid": "199e0eae-07de-557f-a34d-084661ccc0a0",
      "interactionPlan": "01905953611",
      "medium": "Phone",
      "mediumManager": "VCC",
      "presentedSkills": [
        "Sales"
      ],
      "party": {
        "role": "External"
      },
      "agentHandleTimes": {
        "total": 22382,
        "connected": 5868,
        "wrap": 16514
      },
      "targetTimeToAnswer": null,
      "status": "Completed"
    },
    {
      "queueName": "Sales V Queue",
      "queueType": "Virtual",
      "enteredQueue": "2022-07-19T13:06:18.817Z",
      "queueDuration": 8861,
      "queueExitCategory": "Answered",
      "queueExitReason": "Delivered",
      "completedAt": "2022-07-19T13:06:50.060Z",
      "interactionGuid": "199e0eae-07de-557f-a34d-084661ccc0a0",
      "interactionPlan": "01905953611",
      "medium": "Phone",
      "mediumManager": "VCC",
      "presentedSkills": [
        "Sales"
      ],
      "party": {
        "role": "External"
      },
      "agentHandleTimes": {
        "total": 22382,
        "connected": 5868,
        "wrap": 16514
      },
      "targetTimeToAnswer": 60000,
      "status": "Completed"
    },
    {
      "queueName": "APIRouting UCD",
      "queueType": "ACD",
      "enteredQueue": "2022-07-19T13:06:26.672Z",
      "queueDuration": null,
      "queueExitCategory": null,
      "queueExitReason": null,
      "completedAt": null,
      "interactionGuid": "ceebcea6-55ff-540f-a596-6efd82f8f3b1",
      "interactionPlan": "01905953611",
      "medium": "LiveAgent",
      "mediumManager": null,
      "presentedSkills": [],
      "party": {
        "role": "External"
      },
      "agentHandleTimes": {
        "total": null,
        "connected": null,
        "wrap": null
      },
      "targetTimeToAnswer": null,
      "status": "Ongoing"
    },
    {
      "queueName": "Credit ACD",
      "queueType": "ACD",
      "enteredQueue": "2022-07-19T13:06:57.065Z",
      "queueDuration": 9405,
      "queueExitCategory": "Answered",
      "queueExitReason": "Delivered",
      "completedAt": "2022-07-19T13:07:19.548Z",
      "interactionGuid": "c793d222-dd61-5aec-81de-d7bc8861429d",
      "interactionPlan": "01905953611",
      "medium": "Phone",
      "mediumManager": "VCC",
      "presentedSkills": [
        "Gold"
      ],
      "party": {
        "role": "Agent"
      },
      "agentHandleTimes": {
        "total": 13078,
        "connected": 4326,
        "wrap": 8752
      },
      "targetTimeToAnswer": null,
      "status": "Completed"
    },
    {
      "queueName": "ACDLongest",
      "queueType": "ACD",
      "enteredQueue": "2022-07-19T13:07:35.478Z",
      "queueDuration": null,
      "queueExitCategory": null,
      "queueExitReason": null,
      "completedAt": null,
      "interactionGuid": "59dd36eb-2b2e-5c1a-b5cf-37cd6033ef93",
      "interactionPlan": "012345",
      "medium": "Phone",
      "mediumManager": "VCC",
      "presentedSkills": [],
      "party": {
        "role": "External"
      },
      "agentHandleTimes": {
        "total": null,
        "connected": null,
        "wrap": null
      },
      "targetTimeToAnswer": null,
      "status": "Ongoing"
    }
  ],
  "upTo": "2022-07-19T13:07:45.197Z"
} 

Each queue activity item in the collection contains the following parameters: