Skip to contentSkip to navigationSkip to topbar
On this page

Enrich profiles with Flex interaction data



Enriched interaction events

enriched-interaction-events page anchor

Flex uses customer interaction data to enrich user profiles in Segment. For each customer interaction, Flex sends two enrichment events:

To send enrichment events, you must have the source flex-unify-server-source configured in your Segment workspace. This source is created when you connect a Segment workspace, and you can confirm it's configured by navigating to Unify > Unify settings > Profile sources in Segment.

The Profile explorer events tab which displays enrichment events from customer interactions.

Flex - Engagement Initiated

flex---engagement-initiated page anchor

Flex sends the Flex - Engagement Initiated event to Segment when an agent ends the call or conversation and the task enters wrap-up mode. This event has the following properties:

PropertyDescription
customerStartTimeThe start time of the interaction.
DurationThe duration of the interaction in seconds.
lastKnownAgentWorkerSidWorker SID (WKxxxxx) for the last agent handling the interaction.
firstKnownAgentWorkerSidWorker SID (WKxxxxx) for the first agent handling the interaction.
interactionSidThe interaction SID (KDxxxxx).
channelSidThe channel SID (UOxxxxx).
channelTypeThe channel type of the interaction. (For example, Email, SMS, or WhatsApp)
DirectionIndicates whether the interaction was inbound or outbound.

Flex - Engagement Completed

flex---engagement-completed page anchor

Flex sends the Flex - Engagement Completed event to Segment when an agent completes the wrapup phase, and the task is completed. If you're using Copilot, wrap-up notes are also available at this point.

Flex - Engagement Completed has the following properties:

PropertyDescription
channelSidThe channel SID.
interactionSidThe interaction SID.
codesTopic and disposition code from the Agent Copilot wrap-up notes. (For example, {"dispositionCode":"Scheduled test drive", "topic":"Used vehicles"})
sentimentThe sentiment of the end-customer, as detected by Agent Copilot. (Can be positive, neutral, or negative)

After each customer interaction, the following profile traits are also updated based on the Flex-to-Segment enrichment:

  • flex_last-interaction-duration
  • flex_last-interaction-outcome
  • flex_last-interaction-sentiment
  • flex_last-interaction-start-time
  • flex_last-interaction-topics
  • flex_last-known-agent

Learn more about using profile enrichment data for creating computed traits(link takes you to an external page) in Segment.


View enriched events and traits

view-enriched-events-and-traits page anchor

You can view enriched events associated with a user profile in Segment:

  1. In Segment, navigate to the Profile explorer (Unify > Profile explorer).
  2. Select a user profile.
  3. Click Events.

Use enriched profile data for intelligent routing

use-enriched-profile-data-for-intelligent-routing page anchor

You can use enriched Segment profile data for intelligent routing. With Twilio Studio's Search for a Profile widget, you can look up customer profile information when handling an inbound call.

You can then configure your Studio Flow to branch out based on the values of the enriched profile traits. For example:

  • If a customer's last interaction sentiment is negative, route the caller to a higher-priority queue.
  • If a customer's last interaction occurred less than 24 hours ago for a specific topic, route them to the appropriate queue for follow-up.

Learn more about intelligent routing in Studio where you can use real-time, enriched profile data for each customer.