Send to Flex
Description:
For Flex-enabled accounts, Send To Flex transfers an incoming call or message to Flex by creating a TaskRouter Task. Voice calls are enqueued and the caller will hear hold music while waiting for a matched Flex Worker to accept the voice task. Messages are transferred to Flex as new tasks for assignment to a Worker.
Required Configuration:
You must select a Workflow and a Channel when configuring this Widget.
Name |
Description |
Workflow |
The name of the Flex Worfklow you want to assign to your Studio Flow. The SID of your selected Workflow is reflected on the widget itself. |
Channel |
The Flex Task Channel used by your Studio Flow. Only Voice and Programmable Chat are currently supported (select Programmable Chat for SMS, WhatsApp, Facebook or Line). |
Optional Configuration:
You may optionally declare task attributes, priority, timeout, hold music TwiML URL and associated URL method for the request initiated by this Widget.
Name |
Description |
Priority |
The priority of this task in the TaskQueue. Tasks with a higher priority are assigned before older tasks with a lower priority. If not specified, this will be treated as |
Timeout |
The amount of time in seconds that the task is allowed to live. Defaults to 24 hours (or |
Attributes |
JSON representing the task attributes (max. 1024 characters). |
URL Method |
HTTP method to be used when requesting the Hold Music TwiML URL (GET or POST). |
Hold Music TwiML URL |
The URL for custom hold music while the customer waits in the queue. If not specified, the default hold music will play upon transfer. Related to the Enqueue TwiML Verb. |
If you want to pass an object — for instance, data that you retrieved via a function — as an attribute value in your Task Attributes, you can use the to_json Liquid Template Filter like this:
"customer_attributes": {{widgets.CustomerFunction.parsed | to_json}}
Transitions:
Name |
Description |
Task Created |
For Voice calls, transition is triggered when the Enqueue action URL is requested. For Messages, transition is triggered as soon as the TaskRouter Task is created. |
Failed to Create Task |
For Voice calls, transition is triggered if enqueuing of the call fails. For Messages, transition is triggered immediately when TaskRouter returns an error for Task creation. |
Call Failed |
Only applies to Voice calls. Transition is triggered if QueueResult is "system-error". |
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.