Skip to main content
OpenCX works alongside your reps inside Twilio Flex. The AI resolves what it can, escalates what it can’t, and when a task reaches a human it arrives in with the full summary, sentiment, and reason already attached — no context rebuild, no separate inbox.
Setup starts at Settings → Integrations in your OpenCX dashboard.

What you get

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

WhatsApp

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

1

Connect credentials

Paste your Account SID, Auth Token, Workspace SID, and AI Queue SID. Copy the webhook URL OpenCX generates.
2

Register the webhook on both Twilio surfaces

TaskRouter and the Conversations service. Skipping one is the most common onboarding failure — see Connect Twilio Flex.
3

Add the workflow filters

Route AI-skilled tasks to the OpenCX AI worker; route handedOff == true tasks to your human queue.
4

Understand the handoff contract

Read Handoff and task attributes so you know exactly what OpenCX writes and what your workflow is expected to do.

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.