What you get
AI deflects before a rep ever sees the task
AI deflects before a rep ever sees the task
OpenCX accepts the on behalf of an automatically provisioned AI worker and replies in the same Flex conversation your reps use. If the AI resolves, the task never surfaces to a human queue.
Tasks arrive with summary, sentiment, and reason
Tasks arrive with summary, sentiment, and reason
When the AI escalates, OpenCX rejects its reservation and updates the Flex task attributes with
handedOff: true, a one-paragraph summary, the reason for handoff, the detected sentiment, and the conversation language. Your workflow filter on handedOff == true routes it to the right human queue.One conversation from first message to close
One conversation from first message to close
AI replies post into the same Flex thread your rep will inherit. No copy-pasting, no duplicated identity — the rep picks up the handoff note and keeps going.
Flex task attributes usable in Autopilot
Flex task attributes usable in Autopilot
Every attribute your Flex workflow sets on a task — order ID, user ID, city, zone — is flattened onto the OpenCX session as
flex_* fields. actions can read them straight out of custom_data.Consistent logging across every task
Consistent logging across every task
OpenCX persists the Flex task SID, reservation SID, and conversation SID on every session, so any task in Flex traces back to the exact AI reasoning in the OpenCX Inbox.
Supported channels
Twilio Flex funnels every inbound channel through one Conversations + TaskRouter pipeline. Pick the channel you’re wiring in first — each page covers the implementation details on top of the shared Flex setup.Web Chat
AI Chat Widget conversations routed to reps as Flex live chats.
Voice
AI Phone calls routed as Flex voice tasks with transcript attached.
SMS
AI SMS conversations routed as Flex messaging tasks.
AI WhatsApp conversations routed as Flex messaging tasks.
Observability
Every conversation OpenCX hands to Flex is traceable in both directions. Reps read the AI’s work on the Flex task; admins trace a Flex task back to the exact OpenCX session.Task and conversation IDs on every session
Task and conversation IDs on every session
OpenCX stores the Flex
task SID, reservation SID, and conversation SID on the session. Search the Inbox by any of them to open the session that produced the task.Handoff summary and sentiment on task attributes
Handoff summary and sentiment on task attributes
On handoff, OpenCX writes
handedOff, handoffReason, handoffSummary, handoffSentiment, handoffLanguage, and handoffTimestamp into the Flex task’s attributes. Your workflow filter reads them; your rep sees them in the task panel.`flex_*` fields on OpenCX `custom_data`
`flex_*` fields on OpenCX `custom_data`
Every attribute your Flex workflow sets on a task is flattened onto
session.custom_data as flex_<attribute_name> — e.g. flex_order_id, flex_user_id, flex_customer_name. Usable in Autopilot actions without extra configuration.Handoff note visible to the rep in Flex
Handoff note visible to the rep in Flex
At handoff, OpenCX posts a system note into the Flex conversation containing the summary, sentiment, and reason. Your rep sees it inline above their first reply — no tab switching.
Setup path
Connect credentials
Paste your Account SID, Auth Token, Workspace SID, and AI Queue SID. Copy the webhook URL OpenCX generates.
Register the webhook on both Twilio surfaces
TaskRouter and the Conversations service. Skipping one is the most common onboarding failure — see Connect Twilio Flex.
Add the workflow filters
Route AI-skilled tasks to the OpenCX AI worker; route
handedOff == true tasks to your human queue.Understand the handoff contract
Read Handoff and task attributes so you know exactly what OpenCX writes and what your workflow is expected to do.
Related Documentation
Connect Twilio Flex
Credentials, dual webhook registration, workflow filters.
Handoff and task attributes
The AI worker, task-attribute contract, closing Flex tasks.
Channels
Per-channel implementation details on top of the shared setup.
Troubleshooting
Missing webhook, wrong queue, events routed to the wrong org.