Queue Metrics
Access queue metrics via REST methods
Overview
What are Queue Metrics?
A queue is used to identify a pool of contact center agents for which Customer engagements can be matched and routed. Queue Metrics are a collection of metrics associated with this queue, such as the number of agents that are ready, the number of agents that are busy, and the expected wait time.
A Match Queue is made up of:
- Queue Id - The unique queue identifier generated when the Queue is created.
- Channel Id - The unique Contact Center Channel identifier, see Channels for a list of supported channels.
- Attributes - A list of attributes used to describe the skills of the agent. Engagements are typically routed to a suitable agent that matches the attribute combination of the queue. Queue metrics for queues with attributes may be less favorable than queue metrics without attributes, as only a subset of the agent pool may be configured to handle requests with the additional attributes.
- Priority - When Priority is specified the Engagement metrics returned will be for engagements with the specified Priority in that Queue, if not specified then the Engagement metrics returned will be an aggregate of all the Engagements across all priorities currently in Queue. Metrics for higher priority requests against a queue will have more favourable queue metrics (e.g. lower queue wait times). Match requests made with a higher priority will be handled before lower priority requests. The smaller the number meaning the higher the priority.
Types of Queue Metrics
Metric Name | Description |
---|---|
AgentStaffedCount | The number of agents who could be assigned an engagement from this queue |
AgentReadyCount | The number of agents who are 'ready' to be assigned an engagement from the queue |
AgentBusyCount | The number of agents currently 'not ready' to be assigned an engagement from the queue ie. dealing with an active engagement or not available |
WaitingEngagementCount | The number of engagements associated with the queue that have yet to be accepted by an agent |
ProcessingEngagementCount | The number of engagements associated with the queue that have been accepted by an agent and have yet to be completed |
OldestEngagementWaiting | The amount of time in seconds that the oldest engagement associated with an agent has been waiting to be answered |
RollingAverageSpeedOfAnswer | The average amount of time in seconds it takes to answer an engagement associated with the queue |
ExpectedWaitTime | The estimated amount of time in seconds that engagement associated with a queue is expected to be waiting to be answered |
QueueOccupancy | The percentage ratio of busy agents to staffed agents associated with the queue |
Querying Metrics
The request to get metrics must contain an accountId, queueId and channelId path parameters, it may optionally supply attribute and priority query parameters. It does not have a payload.
Type of Metrics | Supplied parameters | metricType value returned | Description |
---|---|---|---|
Queue Based | QueueID + Channel | QUEUE | Queue based metrics are always calculated |
Attribute Based | QueueID + Channel + Attributes | SPECIALIZED_QUEUE | Attribute based metrics returned |
Attribute Based | QueueID + Channel + Attributes | QUEUE | Queue based metrics returned, attribute based metrics are in the process of getting calculated |
Any | Any | DEFAULT | Default metrics returned, in the rare case that no metrics can be found. Its more important to continue on with the engagement rather than send an error code back |
If a request is sent in with only a QueueID + Channel combination (queue based metrics) the metricType field in the response will always be set to QUEUE. Meaning that the metrics returned are queue based as requested.
Sample response when metrics are getting calculated for the requested QueueID + Channel + Attributes combination. Note the field metricType is set to SPECIALIZED_QUEUE in the following response. This indicates that the metrics returned are calculated based on the QueueID + Channel + Attributes combination (attribute based metrics).
{
"accountId": "ABCDEF",
"correlationId": "d0d75f4f-4634-46d0-bc30-7b781f92e4c0",
"matchQueue": {
"queueId": "bea76b16-5aff-4cd6-8db0-5d8d649dd865",
"channelId": "Voice",
"attributes": [
"Language.English"
],
"priority": 3
},
"metricType": "SPECIALIZED_QUEUE",
"metrics": [
{
"metricName": "AgentStaffedCount",
"metricValue": "10"
},
{
"metricName": "AgentReadyCount",
"metricValue": "5"
},
{
"metricName": "AgentBusyCount",
"metricValue": "5"
},
{
"metricName": "WaitingEngagementCount",
"metricValue": "2"
},
{
"metricName": "ProcessingEngagementCount",
"metricValue": "3"
},
{
"metricName": "OldestEngagementWaiting",
"metricValue": "30"
},
{
"metricName": "RollingAverageSpeedOfAnswer",
"metricValue": "10"
},
{
"metricName": "QueueOccupancy",
"metricValue": "100"
},
{
"metricName": "ExpectedWaitTime",
"metricValue": "10"
}
]
}
The metrics service cannot calculate all combinations of QueueID + Channel + Attributes ahead of time. When a combination is requested that metrics are not yet calculated for the metricType field will be set to QUEUE in the response. This means that the metrics returned are calculated based of only the QueueID + Channel combination. It also indicates that the requested attribute based metrics are in the process of getting calculated and to try again in the near future until the metricType field has the value SPECIALIZED_QUEUE. It will take 2-4 seconds for the attribute based metrics to become available.
NOTE: The onus is on the client if they so wish to have logic to handle the case where queue based metrics are returned when attribute based metrics were requested.
Sample response when metrics are not yet calculated for the requested QueueID + Channel + Attributes combination. Note the field metricType set to QUEUE in the following response indicates that the metrics are not yet getting calculated for this QueueID + Channel + Attribute combination.
{
"accountId": "ABCDEF",
"correlationId": "d0d75f4f-4634-46d0-bc30-7b781f92e4c0",
"matchQueue": {
"queueId": "bea76b16-5aff-4cd6-8db0-5d8d649dd865",
"channelId": "Voice",
"attributes": [
"Language.English"
],
"priority": 3
},
"metricType": "QUEUE",
"metrics": [
{
"metricName": "agentStaffedCount",
"metricValue": "0"
},
{
"metricName": "agentReadyCount",
"metricValue": "0"
},
{
"metricName": "agentBusyCount",
"metricValue": "0"
},
{
"metricName": "waitingEngagementCount",
"metricValue": "0"
},
{
"metricName": "processingEngagementCount",
"metricValue": "0"
},
{
"metricName": "oldestEngagementWaiting",
"metricValue": "0"
},
{
"metricName": "rollingASA",
"metricValue": "0"
},
{
"metricName": "queueOccupancy",
"metricValue": "0"
},
{
"metricName": "expectedWaitTime",
"metricValue": "9999"
}
]
}
Sample response when metrics cannot be found. This will be the response format for any request type of request.
{
"accountId": "ABCDEF",
"correlationId": "d0d75f4f-4634-46d0-bc30-7b781f92e4c0",
"matchQueue": {
"queueId": "bea76b16-5aff-4cd6-8db0-5d8d649dd865",
"channelId": "Voice",
"attributes": [
"Language.English"
],
"priority": 3
},
"metricType": "DEFAULT",
"metrics": [
{
"metricName": "agentStaffedCount",
"metricValue": "0"
},
{
"metricName": "agentReadyCount",
"metricValue": "0"
},
{
"metricName": "agentBusyCount",
"metricValue": "0"
},
{
"metricName": "waitingEngagementCount",
"metricValue": "0"
},
{
"metricName": "processingEngagementCount",
"metricValue": "0"
},
{
"metricName": "oldestEngagementWaiting",
"metricValue": "0"
},
{
"metricName": "rollingASA",
"metricValue": "0"
},
{
"metricName": "queueOccupancy",
"metricValue": "0"
},
{
"metricName": "expectedWaitTime",
"metricValue": "9999"
}
]
}
Updated about 2 months ago