Question
What does Flex use to determine the customer's identity (name/phone/email) for display in the Flex UI and to be used by other product integrations?
Product
Twilio Flex
Environment
legacy Twilio Console
Answer
Flex displays a customer label in the task list, conversation header, and anywhere the customer is identified in the Flex UI. Flex determines that label by evaluating task attributes in a specific priority order and using the first attribute that resolves to a value:
-
name (highest priority, all channels)
Ifnameis present in the Task's attributes, Flex uses it as-is and skips all other checks. Use this when you want full control over what is displayed (including custom labels like an account number or ticket ID).{ "name": "Jane Smith" } -
outbound_to (outbound calls only)
If the task is an outbound call andnameis not set, Flex displaysoutbound_to(the number dialed). This is set automatically by Flex for agent-initiated outbound calls.{ "outbound_to": "+15555551234" } -
customerName + customerAddress (email tasks only)
For email tasks, ifnameis not set, Flex combines these into:{customerName} - {customerAddress}
If customerName is absent, only customerAddress is shown.
| Attributes set | Display |
|---|---|
customerName + customerAddress
|
Jane Smith - jane@example.com |
customerAddress only |
jane@example.com |
{
"customerName": "Jane Smith",
"customerAddress": "jane@example.com"
}-
from (default fallback for other channels)
For tasks that don’t match the conditions above (for example inbound SMS, WhatsApp, web chat, or voice), Flex falls back tofrom(typically the customer’s inbound contact address). This is usually populated automatically from the inbound request, but can be overridden if needed.{ "from": "+15555559876" }
Summary Table
| Attribute | Channel / Condition | Notes |
|---|---|---|
name |
All channels | Overrides everything. Set this for full control. |
outbound_to |
Outbound calls only | Usually set by Flex automatically. |
customerName |
Email only | Optional. Combined with customerAddress. |
customerAddress |
Email only | Required for email display. |
from |
All other channels (inbound) | Usually set automatically from inbound contact address. |
Additional Information
Learn more on viewing or setting Task Attributes.