Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

Trait Enrichment


FREE x
TEAM x
BUSINESS
ADDON
(new)

Beta

This feature is in active development and may change before general availability.

Use Trait Enrichment to access Segment profile traits when you sync Audiences and Journeys to Destinations and Destination Functions. With Trait Enrichment, you can use custom, SQL, computed, and predictive traits to enrich the data you map to your destinations.


Set up Trait Enrichment

set-up-trait-enrichment page anchor

Use the following steps to set up Trait Enrichment with Audiences or Journeys.

(information)

Info

The setup steps you'll use for Trait Enrichment depend on the type of destination you've connected.

Set up Trait Enrichment with Audiences

set-up-trait-enrichment-with-audiences page anchor

To set up Trait Enrichment with Audiences:

  1. Navigate to Engage > Audiences.
  2. Create a new Audience. From the Select Destination tab in the Audience builder, select your destination.
    • If you don't see any destinations to add, you'll need to add a destination to your Engage space first.
    • For existing audiences, select the connected Destination from the Audience Overview page.
  3. In the Event Settings section, you'll see two options: Default Setup and Customized Setup. For Trait Enrichment, select Customized Setup.

Set up Trait Enrichment with Journeys

set-up-trait-enrichment-with-journeys page anchor

You can set up Trait Enrichment with Journeys as you're creating or editing your journey in the builder.

  1. From a journeys step, select the destination you're going to use with Trait Enrichment.
  2. On the Connection Settings tab, select Customized Setup and use the corresponding steps below to customize the way data is sent to your destination by creating identifier and trait mappings.

Default setup uses default Segment Destination settings without Trait Enrichment. To use the default settings, select Default Setup, then click Save to resume building your audience or journey.

You can customize event settings at any time.

With Customized setup, you can choose which traits you want to map to your destination or destination function.

  1. Click Customized Setup, then click Add Trait.
  2. Select all traits you want to sync and click Save.
    • Use the Segment column to select traits from the Segment Spec.
    • Use the Destination column to select which traits you want to map to in your destination. By default, Segment attempts to find traits with matching names.
  3. Click Save and finish building your audience or journey.

Segment sends traits you select for enrichment in the traits object in Identify calls (traits.trait_1, traits.trait_2), and as properties in the properties object in Track calls (properties.trait_1, properties.trait_2).

Here's an example Identify call payload with traits in the traits object:

1
{
2
"messageId": "segment-test-message-uozjhr",
3
"timestamp": "2024-02-22T22:11:15.595Z",
4
"type": "identify",
5
"email": "test@example.org",
6
"projectId": "5kXbpcJxms8WWaEdQUkRWc",
7
"traits": {
8
"trait1": 1,
9
"trait2": "test",
10
"trait3": true
11
},
12
"userId": "test-user-cq8idf"
13
}

And here's an example Track call payload with properties in the properties object:

1
{
2
"messageId": "segment-test-message",
3
"timestamp": "2024-02-22T22:10:13.640Z",
4
"type": "track",
5
"email": "test@example.org",
6
"projectId": "5kXbpcJxms8WWaEdQUkRWc",
7
"properties": {
8
"property1": 1,
9
"property2": "test",
10
"property3": true
11
},
12
"userId": "test-user-1tgg9e",
13
"event": "Segment Test Event Name"
14
}

Destination requirements

destination-requirements page anchor

The following are a list of destination-specific requirements for using Trait Enrichment.

Facebook Custom Audiences

facebook-custom-audiences page anchor

You can only sync the following traits to Facebook:

  • email
  • context.device.advertisingId
  • firstName
  • lastName
  • phone
  • gender
  • birthYear
  • birthMonth
  • birthday
  • address.state
  • address.city
  • address.postalCode
  • address.country

Each trait you select must map to a Facebook key.


Destination Actions and Destination Functions setup

destination-actions-and-destination-functions-setup page anchor

If you're using Destination Actions or Destination Functions, use the following steps to set up Trait Enrichment.

  1. Navigate to Engage > Engage settings.
  2. Select the Destinations tab, then click + Add Destination. Trait Activation supports all Destination Actions and Destination Functions.
  3. Select your destination or function.
  4. Navigate to Engage > Audiences, and click + New audience.
  5. From the Select Destinations screen in the Audience builder, select your destination.
  6. Confirm that Send Track or Send Identify is toggled on.
    • Trait Enrichment supports Track and Identify calls. Follow the corresponding destination instructions to determine which event you'll need.
  7. Select Customized Setup.
  8. Select Add Trait. Then, select the traits you want to sync and click Save.

Configure mappings in your destination

configure-mappings-in-your-destination page anchor

After you add traits, configure how your selected traits will map to your destination.

(success)

Success!

Keep your Engage Audience open in a separate tab, as you'll need to return.

  1. Navigate to Connections > Destinations and select your destination.
  2. From the Destination overview screen, select the Mappings tab.
  3. Click + New Mapping.
    • All actions in Destination Actions can receive traits you configure with Trait Activation.
  4. Locate the Select mappings section to confirm the default field mappings match the traits in your custom setup.
    • To update a trait field mapping for Identify calls, click on a field, and in the dropdown search bar enter traits. followed by your trait (for example, traits.trait_1). Segment sends traits you select for enrichment as traits in the traits object.
    • To update a trait field mapping for Track calls, click on a field, and in the dropdown search bar enter properties. followed by your trait (for example, properties.trait_1). Segment sends traits you select for enrichment as properties in the properties object.
    • Click Use as an event variable to add your trait.
  5. Click Save and navigate back to Engage to finish building your Audience.

For best results with Trait Enrichment, Segment recommends:

  • Using Trait Enrichment with new audiences.
  • Using smaller audiences for real-time use cases, as data delivery is slower for large audiences.

What's the difference between Trait Enrichment and ID Sync?

whats-the-difference-between-trait-enrichment-and-id-sync page anchor

Trait Enrichment lets you map the traits data you've collected with Engage to use when syncing audiences and Journeys to destinations.

ID Sync lets you map the identities data gathered for a profile for use when syncing audiences and Journeys to destinations.

How do syncs differ between audiences with Trait Enrichment and audiences without Trait Enrichment?

how-do-syncs-differ-between-audiences-with-trait-enrichment-and-audiences-without-trait-enrichment page anchor

Trait Enrichment on existing audience destinations doesn't automatically resync the entire audience. Only new data flowing into Segment will adhere to the new trait criteria.

Can I edit mappings once Segment syncs the audience?

can-i-edit-mappings-once-segment-syncs-the-audience page anchor

Yes, you can edit mappings in the Destination Mappings tab at any time. However, changes will only take place in subsequent audience syncs or in new audiences connected to the destination.

Does Trait Enrichment guarantee match rate improvements?

does-trait-enrichment-guarantee-match-rate-improvements page anchor

No. Segment doesn't guarantee match rate improvements with Trait Enrichment. Match rates depend on data quality.