NAME

Twilio::Rest::FlexApi::V1::FlexFlow - The FlexFlow resource

SYNOPSIS

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

my $flex_flow = $client->flex_api->v1->flex_flow->create($friendly_name, $chat_service_sid, $channel_type, \%options);
for my $flex_flow ($client->flex_api->v1->flex_flow->read({}, 20)) {
  ...
}
my $flex_flow = $client->flex_api->v1->flex_flow($sid)->fetch;
$client->flex_api->v1->flex_flow($sid)->update(\%options);
$client->flex_api->v1->flex_flow($sid)->delete;

DESCRIPTION

Flex Flow

This file holds FlexFlowList, FlexFlowPage, FlexFlowContext and FlexFlowInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

FlexFlowList

Returned by $client->flex_api->v1->flex_flow. See also Twilio::ListResource.

create

my $flex_flow = $client->flex_api->v1->flex_flow->create($friendly_name, $chat_service_sid, $channel_type, \%options);

Returns a FlexFlowInstance.

The required values are:

$friendly_name

A descriptive string that you create to describe the Flex Flow resource.

$chat_service_sid

The SID of the chat service.

$channel_type

One of web, sms, facebook, whatsapp, line or custom.

The options are:

contact_identity

The channel contact's Identity.

enabled

Whether the new Flex Flow is enabled.

integration_channel

The Task Channel SID (TCXXXX) or unique name (e.g., sms) to use for the Task that will be created. Applicable and required when integrationType is task. The default value is default.

integration_creation_on_message

In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.

integration_flow_sid

The SID of the Studio Flow. Required when integrationType is studio.

integration_priority

The Task priority of a new Task. The default priority is 0. Optional when integrationType is task, not applicable otherwise.

integration_retry_count

The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when integrationType is studio or external, not applicable otherwise.

integration_timeout

The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when integrationType is task, not applicable otherwise.

integration_url

The URL of the external webhook. Required when integrationType is external.

integration_workflow_sid

The Workflow SID for a new Task. Required when integrationType is task.

integration_workspace_sid

The Workspace SID for a new Task. Required when integrationType is task.

integration_type

One of studio, external or task.

janitor_enabled

When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to false.

long_lived

When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to false.

read

my @records = $client->flex_api->v1->flex_flow->read(\%options, $limit, $page_size);

Returns the records as a list, fetching as many pages as it needs.

The options are:

friendly_name

The friendly_name of the Flex Flow resources to read.

stream

my $stream = $client->flex_api->v1->flex_flow->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->flex_api->v1->flex_flow->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->flex_api->v1->flex_flow->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->flex_api->v1->flex_flow->get_context($sid);

Returns a FlexFlowContext, and makes no request.

FlexFlowPage

A Twilio::Page of FlexFlowInstance objects.

records_key

build_instance

Used by Twilio::Page.

FlexFlowContext

Returned by $client->flex_api->v1->flex_flow($sid). It makes no request until one of these methods is called.

fetch

my $flex_flow = $client->flex_api->v1->flex_flow($sid)->fetch;

Returns a FlexFlowInstance.

update

my $flex_flow = $client->flex_api->v1->flex_flow($sid)->update(\%options);

Returns a FlexFlowInstance.

The options are:

channel_type

One of web, sms, facebook, whatsapp, line or custom.

chat_service_sid

The SID of the chat service.

contact_identity

The channel contact's Identity.

enabled

Whether the new Flex Flow is enabled.

friendly_name

A descriptive string that you create to describe the Flex Flow resource.

integration_channel

The Task Channel SID (TCXXXX) or unique name (e.g., sms) to use for the Task that will be created. Applicable and required when integrationType is task. The default value is default.

integration_creation_on_message

In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.

integration_flow_sid

The SID of the Studio Flow. Required when integrationType is studio.

integration_priority

The Task priority of a new Task. The default priority is 0. Optional when integrationType is task, not applicable otherwise.

integration_retry_count

The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when integrationType is studio or external, not applicable otherwise.

integration_timeout

The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when integrationType is task, not applicable otherwise.

integration_url

The URL of the external webhook. Required when integrationType is external.

integration_workflow_sid

The Workflow SID for a new Task. Required when integrationType is task.

integration_workspace_sid

The Workspace SID for a new Task. Required when integrationType is task.

integration_type

One of studio, external or task.

janitor_enabled

When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to false.

long_lived

When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to false.

delete

$client->flex_api->v1->flex_flow($sid)->delete;

Returns true.

FlexFlowInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_sid

The SID of the Account that created the Flex Flow resource and owns this Workflow.

channel_type

One of web, sms, facebook, whatsapp, line or custom.

chat_service_sid

The SID of the chat service.

contact_identity

The channel contact's Identity.

date_created

The date and time in GMT when the resource was created specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date and time in GMT when the resource was last updated specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

enabled

Whether the Flex Flow is enabled.

friendly_name

The string that you assigned to describe the resource.

integration

An object that contains specific parameters for the integration.

integration_type

One of studio, external or task.

janitor_enabled

When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to false.

long_lived

When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to false.

sid

The unique string that we created to identify the Flex Flow resource.

url

The absolute URL of the Flex Flow resource.

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.