NAME

Twilio::Rest::Taskrouter::V1::Workspace::WorkspaceCumulativeStatistics - The WorkspaceCumulativeStatistics resource

SYNOPSIS

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

my $workspace_cumulative_statistics = $client->taskrouter->v1->workspaces($workspace_sid)->cumulative_statistics->fetch;

DESCRIPTION

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

WorkspaceCumulativeStatisticsContext

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

fetch

my $workspace_cumulative_statistics = $client->taskrouter->v1->workspaces($workspace_sid)->cumulative_statistics->fetch(\%options);

Returns a WorkspaceCumulativeStatisticsInstance.

The options are:

end_date

Only include usage that occurred on or before this date, specified in GMT as an ISO 8601 date-time. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

minutes

Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.

split_by_wait_time

A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, 5,30 would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate statistics on up to 10,000 Tasks for any given threshold.

start_date

Only calculate statistics from this date and time and later, specified in ISO 8601 format. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

task_channel

Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its unique_name, such as voice, sms, or default.

WorkspaceCumulativeStatisticsInstance

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 Workspace resource.

avg_task_acceptance_time

The average time in seconds between Task creation and acceptance.

end_time

The end of the interval during which these statistics were calculated, in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

reservations_accepted

The total number of Reservations accepted by Workers.

reservations_canceled

The total number of Reservations that were canceled.

reservations_created

The total number of Reservations that were created for Workers.

reservations_rejected

The total number of Reservations that were rejected.

reservations_rescinded

The total number of Reservations that were rescinded.

reservations_timed_out

The total number of Reservations that were timed out.

split_by_wait_time

A list of objects that describe the number of Tasks canceled and reservations accepted above and below the thresholds specified in seconds.

start_time

The beginning of the interval during which these statistics were calculated, in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

tasks_canceled

The total number of Tasks that were canceled.

tasks_completed

The total number of Tasks that were completed.

tasks_created

The total number of Tasks created.

tasks_deleted

The total number of Tasks that were deleted.

tasks_moved

The total number of Tasks that were moved from one queue to another.

tasks_timed_out_in_workflow

The total number of Tasks that were timed out of their Workflows (and deleted).

url

The absolute URL of the Workspace statistics resource.

wait_duration_until_accepted

The wait duration statistics (avg, min, max, total) for Tasks that were accepted.

wait_duration_until_canceled

The wait duration statistics (avg, min, max, total) for Tasks that were canceled.

workspace_sid

The SID of the Workspace.

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.