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.
Queued callbacks
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:
***. To access the API for your region, replace *** with the correct subdomain for your region:
Region
URL subdomain
Base URL
EMEA emea https://emea.api.newvoicemedia.com USA nam https://nam.api.newvoicemedia.com APAC apac https://apac.api.newvoicemedia.com - <ACCESS_TOKEN>. The value represents a bearer access token which you must use to validate every request. Replace <ACCESS_TOKEN> where used with your bearer access token. For information about getting a bearer access token, see How to authenticate with a Vonage Contact Center (VCC) API.
Headers
Header parameters in Requests (Insights Stats API) apply to this endpoint.
Authorization scopes supported:
Scope | Access granted |
---|---|
stats | Entire endpoint |
Parameters
The endpoint accepts the following query string parameters:
start
Type | Required | Example |
---|---|---|
Date | True | 2021-09-20T15:42:39.825Z |
The start date and time of the search window. Use ISO 8601 format.
end
Type | Required | Example |
---|---|---|
Date | False | 2021-09-20T15:47:39.825Z |
The end date and time of the search window. Use ISO 8601 format. Default is now.
queues
Type | Required | Example |
---|---|---|
String | False | QueueA, QueueB, QueueC |
A comma-delimited list of queue names. Default behavior is to return all queues.
queueType
Type | Required | Example |
---|---|---|
String | False | Virtual |
Possible values are:
- All. Returns queue activities for any queue type.
- ACD. Only returns queue activities for ACDs.
- Virtual. Only returns queue activities for virtual queues.
The default value is All.
Pagination
Paging parameters in Requests (Insights Stats API) apply to this endpoint.
Requests
Request queue activities including processed
|
Request page 2 of queue activities
|
Request queue activity for queues QueueA and QueueB
|
Request queues for virtual queues only
|
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:
- Queue entry. The time at which the queue was entered (value of
enteredQueue
in response). - Queue exit. The time at which the queue was exited (
enteredQueue
+queueDuration
values in response. - Queue activity completion. The time at which the queue activity item was finalized (value of
completedAt
in response). This includes work done by agents who are handling the queue entry. No further updates relating to the queue activity are expected. - Queue activity update. The time at which the record was updated and a new version of the queue activity became available over this endpoint. (This value does not appear in the response.)
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 in Responses (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:
queueName
. The name of the queue, as configured in the Automatic Call Distributor (ACD) or Universal Contact Distributor (UCD) applet in the Vonage Contact Center (VCC) admin portal.queueType
. The type of queue. Possible values are: ACD or Virtual.enteredQueue
. The time when the interaction entered the queue.enteredQueue
is a UTC date in ISO 8601 format.queueDuration
. The length of time that the queueing party remained in the queue. Measured in millisecond (ms). This will be null if the party is still queueing.queueExitCategory
. The category of reason for the interaction leaving the queue. Possible values are:- Answered. The interaction was connected to an agent.
- Abandoned. The party who was queuing hung up while in the queue.
- Breakout. Queuing was ended by the interaction triggering a breakout, either voluntarily by the queuing party, or through configured settings within the queue itself.
- Cancelled. An agent consulting to a different queue chose to stop queuing, either by ending the consult and recalling the caller from hold, or by transferring the caller into the queue.
- If the queue is ongoing,
queueExitCategory
will be null.
queueExitReason
. The reason the interaction left the queue. Possible values are dependent onqueueExitCategory
:- Delivered. If
queueExitCategory
is Answered,queueExitReason
is always Delivered. - HangUp. If
queueExitCategory
is Abandoned,queueExitReason
is always HangUp. - VoluntaryBreakout. The party who was queuing chose to leave the queue when offered to do so.
- QueueCapacityBreakout. The queue was at the configured maximum capacity so VCC routed the interaction out of the queue.
- QueueTimeBreakout. The interaction had queued for the maximum amount of allowed time so VCC routed the interaction out of the queue.
- NoAgentsBreakout. No agents were available to serve the queue so VCC routed the interaction out of the queue.
- MaxEstimatedWaitTimeBreakout. The estimated wait time for an agent to handle the interaction exceeded the configured maximum so VCC routed the interaction out of the queue.
- AgentDeclineBreakout. The agent declined the interaction.
- AgentTransfer. The queuing agent transferred the party on hold into the queue and left the interaction,
queueExitCategory
is Cancelled. - AgentRecall. The queuing agent canceled the queue event and recalled the customer,
queueExitCategory
is Cancelled. - If the queue is ongoing,
queueExitReason
will be null.
- Delivered. If
completedAt
. The time at which the queue activity completed. This means there will be no further updates to the queue activity.completedAt
is a UTC date in ISO 8601 format. Whilst the queue activity is ongoing,completedAt
will be null.interactionGuid
. The unique identifier for the interaction.interactionPlan
. The name or number of the interaction plan.medium
. The type of communication method.mediumManager
. The origin application of the interaction, for example, VCC (Vonage Call Centre) or VBC (Vonage Business Cloud).presentedSkills
. A comma-delimited list of presented skills.party
.party
contains information about which party role entered the queue:role
. The role of the party. Possible values are:- External. Most commonly indicates the customer’s channel, but any call to a number not linked to an agent will show as External.
- Agent. Indicates the VCC agent’s channel.
- Null. Reserved for future use.
agentHandleTimes
.agentHandleTimes
contains information about the time spent by agents handling the interaction after it left the queue:total
. A length of time, measured in milliseconds which indicates the total connected and wrap time of agents handling this interaction after it left the queue. IfqueueExitReason
is not Delivered, HangUp, or AgentRecall,total
will be null.connected
. A length of time, measured in milliseconds which indicates the total connected time of agents handling this interaction after it left the queue. IfqueueExitReason
is not Delivered,connected
will be null.wrap
. A length of time, measured in milliseconds which indicates the total wrap time of agents handling this interaction after it left the queue. IfqueueExitReason
is not Delivered, HangUp, or AgentRecall,wrap
will be null.
targetTimeToAnswer
. Target time to answer (TTA)—in milliseconds—associated with the queue.status
. Reports on the status of the queue activity. Possible values are:Ongoing
. The queue activity is still ongoing and will receive further updates.Completed
. The queue activity has completed and will no longer receive further updates.InternalError
. There has been an error whilst processing the queue activity which may prevent further updates.
For information, see Trying out Vonage Contact Center APIs.