SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Add External Contact and Customer Phone Number to Flex Insights for Message and Chat Conversations

For chat-based conversations (SMS, WhatsApp, etc.), using Programmable Chat (Legacy) addresses, Flex Insights reports (empty value) for the External ContactCustomer and Customer Phone fields by default. However, these fields are automatically populated for voice-based conversations and chat-based conversations using Flex Conversations addresses. Since Customers' geolocation attributes are attached to Customer Phone, they may also be empty (Region, Country, State, Area, Area Code and Geolocation).

This guide is intended to show how to populate these attributes for chat-based conversations when they are not populated by default.

Add attributes

To add this data to your Flex Insights reporting, you'll need to add specific attributes updating the task with a Flex Plugin or a function, or using the SendToFlex widget in the desired Messaging Twilio Studio flow(s).

For more information on how to update tasks, see Twilio Flex: Add Additional TaskRouter Data (Twilio Docs).

External Contact: For this field, the value should be equal to your call center's phone number. These are the attributes used for each contact type:

Contact direction Attribute
Outbound task_attributes.from
Inbound task_attributes.to
Neither null

Customer Phone: For this field, the value should be equal to the customer's phone number. These are the attributes used for each contact type:

Contact direction Value
Outbound task_attributes.to
Inbound task_attributes.from
Neither null

 

An example on how to update the Studio flow to add the attributes for incoming messages:

 

Screenshot_2021-05-14_at_15.00.51.png

Addition help

If you need further assistance, please contact the Support Team.

Have more questions? Submit a request
Powered by Zendesk