Get Queue Metrics

Last Updated : Aug 07, 2024 |

You can use the Get Queue Metrics task to retrieve the metrics for a specific queue, channel, attributes, and priority. The Get Queue Metrics task creates a snapshot of queue metrics based on the current queue and attributes, and stores these metrics as task result variables in the workflow cache for use in conditional or assignment expressions.

The Get Queue Metrics task contains two default, read-only outputs:

  • Success: The task retrieves all the metrics successfully.

  • Error: The task did not retrieve all the metrics within 10 seconds.

You can use the Get Queue Metrics task to create additional outputs with conditions using metrics values. When you create new outputs, Orchestration adds the outputs above the default ones. You can rearrange the output order as required.

When you create multiple output conditions, if you enter an invalid expression in the conditional logic of any output condition, Orchestration skips that output condition and evaluates the next one in the list.

You can also assign variables to the Get Queue Metrics task. The task stores the metrics in the success result variables of the current task at the following path:

Current Task > success > metrics

The Get Queue Metrics task also stores the metrics in result variables, and hence, the metrics are available in the expressions of the next task in the workflow.

Result Variables > <Task Name> > success > metrics

You can use the Result Mapping section of the Get Queue Metrics task to assign existing cache variables, create new cache variables, or change the properties of the next task.

Example

You can use the Get Queue Metrics task to check whether an agent is currently available to connect an incoming call to the agent. The Agent Ready Count metric in the Get Queue Metrics task determines whether an agent is available.

If the Agent Ready Count value is greater than zero, indicating that agents are available, the workflow proceeds to the Connect Agent task, successfully connecting the most suitable agent to the interaction.

If no agents are available, the workflow proceeds to Start Automation.

Supported metrics

The Get Queue Metrics supports the following metrics:

  • Agent Staffed Count

  • Agent Ready Count

  • Agent Busy Count

  • Waiting Engagement Count

  • Processing Engagement Count

  • Oldest Engagement Waiting

  • Rolling Average Speed of Answer (ASA)

  • Queue Occupancy

  • Expected Wait Time

For additional information about these metrics, see Measures under the QueueByChannel producer.