Skip to content
ChangelogBook a demoSign up

Traits

AudienceData teams, marketers
PrerequisitesA defined schema with at least one parent model

Traits calculate values that aren't already available as fields in your customer data. Use them for values such as lifetime spend, purchase count, most recent product, or days since last order, then use those values in audiences or syncs.


How traits fit into audience building

Audience filters decide who qualifies. Traits calculate values you can use to make that decision.

For example, suppose you want to reach high-value customers. Your warehouse may contain individual purchase records but no Lifetime value field. Instead of rebuilding the calculation every time you create an audience, you can create a trait that sums each customer's purchases.

You could then filter on:

  • Lifetime value > 500
  • Lifetime value is in the top 10%
  • Lifetime value > Average order value

Marketers can select an existing trait in the visual audience builder or ask the Agent to find and apply one while drafting audience conditions.

Traits can also add data you want to send with an audience. For example, an abandoned-cart audience could include each customer's most recently abandoned product so a messaging tool can personalize the follow-up.

Use a trait when the value you need must be calculated from customer attributes, related records, events, or other model data.

If your company already maintains the calculation as a shared business metric, such as an official LTV or churn score, keep it in your warehouse and expose it as a model column instead. See Plan your data model for guidance on where calculations should live.


Use traits where you need them

You may already have saved traits available to use. Data teams can create reusable traits, such as 90-day purchase value, that marketers can use across audiences and syncs.

You can also create calculations while working in an audience:

  • Need a value to decide who qualifies? Create a custom trait directly in the audience builder.
  • Need to add data to the people who already qualify? Add a trait enrichment, such as each customer's most recently abandoned product.
  • Keep rebuilding the same calculation? Create a saved trait so it can be reused across audiences and syncs.
  • Keep creating variations of the same calculation? Create a trait template and use it to build related traits such as 30-day, 90-day, and 12-month purchase value.

Create a saved trait

Create a saved trait when the same calculated value should be available across audiences or syncs.

  1. Go to Customer Studio > Traits.
  2. Select Create > New trait.
  3. Choose the model the trait belongs to.
  4. Choose the calculation method.
  5. Configure the calculation.
  6. Preview the results.
  7. Name and save the trait.

Create a trait

Most reusable customer-level traits belong on the parent model. You can also create traits on related or event models when the calculation belongs to those records instead.

Choose a parent, related, or event model for the trait


Configure the calculation

The calculation method determines what value the trait produces.

Choose a calculation method

MethodCalculates...Example
AggregationSum or average across related or event recordsTotal purchase value
CountNumber of matching recordsPurchases in the last 30 days
OccurrenceFirst, last, most frequent, or least frequent valueMost recently purchased category
ListA list of values or objectsRecently viewed product IDs
SQL AggregationCustom aggregation logic across related recordsProduct data as an array or JSON value
SQL FormulaA value from columns and other traits already on the modelLoyalty status flag

Choose a trait method

Depending on your workspace configuration, you may also see Prediction, Catalog Recommendation, Lookalike Audience, and Audience membership methods. See Predictive traits for the prediction, catalog recommendation, and lookalike methods.

Traits used in realtime audiences support a subset of methods: Aggregation (Sum only), Count, and Occurrence (First or Last). The other methods are available for batch traits only.

Choose which records contribute to the trait

Most calculation methods let you choose a related or event model and optionally filter the records before calculating the trait.

For example, a 90-day purchase value trait could use:

  • model: Purchases
  • input filter: purchases from the last 90 days
  • method: Sum
  • field: order_value

Trait filters and audience filters do different jobs. Trait filters decide which records contribute to the calculated value, and audience filters compare that resulting value to decide who qualifies. For example, a trait can calculate spend from completed purchases only, then an audience can include customers where that trait is greater than $500.

Select Preview results to confirm the trait returns the values you expect before saving it.


Configure each method

Aggregation

Use Aggregation to calculate the sum or average of a numeric field across related or event records.

For example:

Sum order_value across completed purchases

Configure:

  • related or event model
  • optional input filters
  • Sum or Average
  • field to aggregate

Count

Use Count to count matching records.

For example:

Number of purchases in the previous 30 days

Configure:

  • related or event model
  • optional input filters
  • optional field to count by

Occurrence

Use Occurrence to return a value based on position or frequency.

Choose an occurrence type:

  • First / Min
  • Last / Max
  • Most frequent
  • Least frequent

For example:

Most frequently purchased product category

Configure:

  • related or event model
  • optional filters
  • occurrence type
  • value to return
  • ordering, where applicable

List

Use List to return multiple values from related or event records.

For example:

Product IDs viewed in the last 7 days

Configure:

  • field or fields to return
  • optional filters
  • deduplication
  • ordering
  • optional list length

Depending on workspace configuration, list traits can return individual values or objects containing multiple fields.

For value lists, if you turn on deduplication, Order by must match the column you're returning. For object lists, ordering and deduplication can't be used together.

SQL Aggregation

Use SQL Aggregation when the built-in aggregation methods don't cover the calculation you need across related records.

For example:

ARRAY_AGG(DISTINCT {{column "product_id"}})

Use the column syntax shown in the SQL editor when referencing fields: double curly braces around the keyword column, followed by the column name in quotes. Column names are case-sensitive.

You also configure:

  • a default value
  • the resulting property type

SQL Formula

Use SQL Formula to calculate a value from fields and traits already available on the model.

Unlike SQL Aggregation, SQL Formula doesn't aggregate data from a related or event model. It works with values already available on the current row.

Use autocomplete in the SQL editor to insert fields and traits. To reference a merged field, use its dot path. To reference another trait, prefix it with trait..

For example:

  • Combine columns: CONCAT({{"first_name"}}, ' ', {{"last_name"}})
  • Create a Boolean flag from a merged column: CASE WHEN {{"merged.pets.animal"}} LIKE 'dog' THEN true ELSE false END
  • Reference another trait: CASE WHEN {{"trait.lifetime_total_value"}} > 1000 THEN 'high' ELSE 'low' END

References to fields or traits that don't exist appear as a red pill in the editor. Use autocomplete to insert valid references.


Name and describe the trait

Give the trait a name that tells marketers what the value means.

Prefer:

90-day purchase value

over:

ltv_90d_v2

Use the description for details that aren't obvious from the name, such as:

  • which records are included
  • the time window
  • currency or units
  • important exclusions

Clear names and descriptions make traits easier to find in the audience builder and easier for the Agent to interpret.

Finalize a trait


Use a saved trait in an audience

Saved traits appear in the Traits filter group in the audience builder.

For example:

Lifetime value > 500

You can compare traits with fixed values or, where supported, other fields and traits.

If you're not sure which trait to use, select Ask an agent while adding a filter. Describe what you want to filter on, and the Agent can suggest an available trait. See the Audience builder prompting guide.

See Audience filters for available operators and more advanced filter logic.

Use a trait in an audience


Create a custom trait in an audience

If you need a calculated value while building one audience, create a custom trait directly in the audience builder.

  1. Select Add filter.
  2. Open Custom traits.
  3. Select Create a custom trait.
  4. Choose the related or event model.
  5. Configure the calculation.
  6. Use the resulting value as part of the audience condition.

Custom trait calculation

If you later need the calculation in other audiences, save it as a reusable trait.


Add trait enrichments to an audience

Use a trait enrichment when you want to add data to audience members without using that data to decide who qualifies.

For example, an abandoned-cart audience might qualify based on cart activity, then include each customer's most recently abandoned Product_ID for use in a follow-up message.

Create a trait enrichment from the audience's Traits tab

To add an enrichment:

  1. Open the saved audience.
  2. Go to the Traits tab.
  3. Select Create trait enrichment.
  4. Choose a calculation method:
    • Trait template — calculate a value from an existing template, with optional conditions for this audience.
    • Static value — assign the same text or number to every audience member, such as campaign code SPRING26.
  5. Name the enrichment. This name appears when you configure sync mappings.
  6. Save the enrichment.
Static value trait enrichments must be enabled by Hightouch. to turn it on.

Configure a trait enrichment from a template or a static value

The enrichment appears in audience preview and can be used in supported sync mappings.

The saved enrichment in the audience's Traits tab

Create an enrichment from an event

You can also create an enrichment from an event condition after saving the audience.

For example, capture the Product_ID, SKU, or Brand from the last qualifying cart event.

Open the event condition's ... menu and select Sync a trait from this filter. Choose the value you want to capture, then save the enrichment.

Select Sync a trait from this filter in an event condition's menu


Reuse trait logic with templates

Create a trait template when your team repeatedly builds variations of the same calculation.

For example, one template could calculate completed purchase value over a configurable time window. Your team could use it to create:

  • 30-day purchase value
  • 90-day purchase value
  • 12-month purchase value

Saved templates appear on the Templates tab of the Traits page.

The Templates tab in the Traits list

To create a template:

  1. Go to Customer Studio > Traits.
  2. Select Create > New template.
  3. Choose the trait model and calculation method.
  4. Configure the reusable calculation.
  5. Name and save the template.

To create a trait from a template, select Create > Start with a template, choose the template, add any conditions specific to the new trait, preview the result, and save it.

A trait created from a template inherits the template's model, calculation method, and calculation settings. You can still change its filters, name, and description.

Changes to a template update the shared calculation for every trait created from it. Each trait keeps its own filters. Before changing a template, review which traits use it.


Manage saved traits

Saved traits appear in Customer Studio > Traits. The list shows each trait's name, type, trait model, what it's calculated from, and when it was last updated.

Traits list

Open a trait to view its configuration and see where it's used.

A trait's Configuration tab

Review usage before changing a trait

A saved trait can be used by multiple audiences or syncs.

Before changing a shared calculation, check the Usage tab to see which workflows depend on it.

Trait usage


Most traits used for customer targeting belong on the parent model. You can also create traits on related or event models when the calculated value belongs to those records.

For example, on a Purchase model you could calculate:

  • how many high-value items each purchase contains
  • whether a purchase happened on a weekend

You can then use those values while filtering through the relationship.

Traits on related or event models can be used in filters, but they aren't directly available as parent-level fields for destination syncs. To send the value to a destination, create the trait on the parent model or add it as an audience trait enrichment.


Suggest trait values in the audience builder

String traits can suggest common values in the audience builder, so marketers pick from real values instead of typing them.

For example, a Most recent city trait might suggest San Francisco, Los Angeles, or New York.

Value suggestions are available only for traits that return a string and may need to be enabled for your workspace.

To configure them, open the trait and go to the Suggestions tab. Turn suggestions on, then choose how often Hightouch refreshes the values or refresh them manually.

Enable trait value suggestions


Permissions

Creating, editing, and deleting saved traits and trait templates requires the Manage traits grant.

Admins can assign this grant across all parent models or for individual parent models without giving users permission to configure the full Customer Studio schema.

See Roles for details.


Next steps

Ready to get started?

Jump right in or a book a demo. Your first destination is always free.

Book a demoSign upBook a demo

Need help?

Our team is relentlessly focused on your success. Don't hesitate to reach out!

Feature requests?

We'd love to hear your suggestions for integrations and other features.

Privacy PolicyTerms of Service