NAME

Twilio::Rest::Taskrouter::V1::Workspace::TaskQueue::TaskQueueRealTimeStatistics - The TaskQueueRealTimeStatistics resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

my $task_queue_real_time_statistics = $client->taskrouter->v1->workspaces($workspace_sid)->task_queues($task_queue_sid)->real_time_statistics->fetch;

DESCRIPTION

This file holds TaskQueueRealTimeStatisticsContext and TaskQueueRealTimeStatisticsInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

TaskQueueRealTimeStatisticsContext

Returned by $client->taskrouter->v1->workspaces($workspace_sid)->task_queues($task_queue_sid)->real_time_statistics. It makes no request until one of these methods is called.

fetch

my $task_queue_real_time_statistics = $client->taskrouter->v1->workspaces($workspace_sid)->task_queues($task_queue_sid)->real_time_statistics->fetch(\%options);

Returns a TaskQueueRealTimeStatisticsInstance.

The options are:

task_channel

The TaskChannel for which to fetch statistics. Can be the TaskChannel's SID or its unique_name, such as voice, sms, or default.

TaskQueueRealTimeStatisticsInstance

See also Twilio::InstanceResource.

It has fetch, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account that created the TaskQueue resource.

activity_statistics

The number of current Workers by Activity.

longest_relative_task_age_in_queue

The relative age in the TaskQueue for the longest waiting Task. Calculation is based on the time when the Task entered the TaskQueue.

longest_relative_task_sid_in_queue

The Task SID of the Task waiting in the TaskQueue the longest. Calculation is based on the time when the Task entered the TaskQueue.

longest_task_waiting_age

The age of the longest waiting Task.

longest_task_waiting_sid

The SID of the longest waiting Task.

task_queue_sid

The SID of the TaskQueue from which these statistics were calculated.

tasks_by_priority

The number of Tasks by priority. For example: {"0": "10", "99": "5"} shows 10 Tasks at priority 0 and 5 at priority 99.

tasks_by_status

The number of Tasks by their current status. For example: {"pending": "1", "reserved": "3", "assigned": "2", "completed": "5"}.

total_available_workers

The total number of Workers in the TaskQueue with an available status. Workers with an available status may already have active interactions or may have none.

total_eligible_workers

The total number of Workers eligible for Tasks in the TaskQueue, independent of their Activity state.

total_tasks

The total number of Tasks.

url

The absolute URL of the TaskQueue statistics resource.

workspace_sid

The SID of the Workspace that contains the TaskQueue.

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.