Skip to content
Last updated

Configuring Behavior Activation

This feature is a public Beta release.

This topic explains how to enable and configure Behavior Activation: configuring a single behavior table in the Treasure AI Console, and configuring multiple behavior tables through the Audience API.

Enable Behavior Activation

Behavior Activation must be enabled at a Parent Segment level.

  1. Open Treasure Console.
  2. Navigate to Data Workbench > Master Segments.
  3. Select an existing parent segment or create a new parent segment. For details, see Creating Parent Segments.
  4. Enable Behavior Column Mapping.
  5. Configure the maximum number of rows that can be associated with a single user profile. You can have a maximum of 20 rows associated with a single user profile.

Activate a Segment with Behavior Data

For general details on segment activation UI elements, see Customize Activation Output.

  1. Open Treasure Console.
  2. Navigate to Audience Studio.
  3. Select an existing parent segment or create a new parent segment. For details, see Creating Parent Segments.
  4. Select an existing segment or create a new segment within the parent segment.
  5. Create a new segment with segment rules that is configured to select behavior data. For details, see Segments Overview. The following screenshot shows a segment that selects purchase behavior among others.

You must select and use the behavior field in the segment rule, if you want to activate it. If you do not use a behavior field, it cannot be activated.

When you use match logic ANY and activate attributes and behaviors, for qualifying profiles with no records meeting the rules of the activated behavior table, behavior data value would be marked as NULL. For details, see Match Logic ANY Example with NULL value

  1. Select the segment.

  2. Select the Activations tab.

  3. Select Create activation.

  4. Fill Details as applicable. When selecting a template or activation, you can scroll the list to use Activation Templates or Existing v5 Activations.

  5. Select Output Mapping.

  6. In the Behavior Columns section, select Add Table.

  7. Select Add column. You can map a column in the source table to an output column in the output table. This mapping is termed as behavior column mapping. You have the option to rename the output column name.

If you want to order the activation export data by a certain column data, ensure that the source column name has not been mapped to a different output column name.

  1. Behaviors are selected based on the criteria provided. Select the rows that you want to export.
  2. You can configure additional details based on the row selection, as applicable.
  • If "All Rows" or "Top # rows" are selected, attributes are duplicated for each row of exported behavior data. If you select Top # rows, you can configure the number of top rows that you want to export, the column by which the rows are ordered, and the table formatting.
  • If only 1 row per profile is required to be exported, select first or last. For output table examples based on row selection, see Example.
OptionDescription
All rowsAll rows from the table.
First rowOnly the first row.
Last rowOnly the last row.
Top # rowsSpecify the number of top rows that needs to be exported.​
  1. Select Order by to specify the column and configure order of the output table. For details on order and row-column formatting, see Customize Activation Output.
    image2023-6-6_13-18-48.png

  2. (Optional) You can add columns if needed using String Builder. This allows custom text to be added that can help track or associate activations to specific segments, campaigns, or datetime. For details, see string builder.

  3. After providing all mandatory information for activation, select Create and submit an activation.

Configuring Multiple Behavior Tables

You can activate data from up to four behavior tables in a single activation. This is currently available only through the Audience API; the Treasure AI Console supports configuring a single behavior table as described above. For background on this capability, see Multi-Table Behavior Activations.

Selecting Behavior Tables

To configure multiple tables, send an array of table configurations in the syndicationBehaviors field when creating or updating an activation, in place of the syndicationBehavior field, which is deprecated in favor of syndicationBehaviors but remains accepted for single-table activations during the transition.

  • syndicationBehaviors accepts up to four items, one per behavior table.
  • Each item's behaviorTableName identifies the table, and each table you reference must also be included in the activation's segment rules, the same requirement that applies to single-table Behavior Activation.
  • A behavior table can appear only once across the syndicationBehaviors array.

Mapping Columns

Each table's columns array maps source columns to output columns, the same behavior column mapping concept used for a single table:

  • column is the output column name.
  • source.column is the column name in that behavior table.
  • Output column names can repeat across different tables, but should be unique within a single table's columns array to avoid ambiguity in the output.

Setting Row Limits

Each table's joinStrategy field selects which rows are exported for that table, corresponding to the Export options available for a single table:

OptionDescription
AllAll rows from the table.
FirstOnly the first row.
LastOnly the last row.
Top-NThe top N rows, where N is set in joinRow.

joinRow is only used when joinStrategy is Top-N, and specifies how many rows to export per profile for that table.

The maximum of 20 rows per profile configured in Enable Behavior Activation is unchanged for multi-table activations: it applies as a single combined total across all of a profile's behavior tables, not per table.

Formatting and Ordering Output

Each table's formatting field controls the row-column formatting of that table's output, matching the single-table Formatting options:

OptionDescription
rowsMultiple rows per profile.
colsTranspose rows to columns.

Each table's orderBy array specifies the column (key) and direction (ascending or descending) used to order that table's exported rows.

Output Behavior

The configured tables are joined using a full outer join, and appear in the output in the order they are listed in syndicationBehaviors. For example, a two-table configuration exporting all rows from the first table and the top 3 rows (ordered by purchased_at, descending) from the second table:

"syndicationBehaviors": [
  {
    "behaviorTableName": "email_subscription",
    "columns": [{ "column": "email", "source": { "column": "email" } }],
    "joinStrategy": "All",
    "formatting": "cols",
    "orderBy": [{ "key": "email", "order": "ascending" }]
  },
  {
    "behaviorTableName": "purchase_history",
    "columns": [{ "column": "product_name", "source": { "column": "product_name" } }],
    "joinStrategy": "Top-N",
    "joinRow": 3,
    "formatting": "rows",
    "orderBy": [{ "key": "purchased_at", "order": "descending" }]
  }
]

For full request and response details, see the Audience API Reference.

Behavior Activation Example

The output table data is configured based on the Export, Order by, and Formatting fields.

Export provides the following four row selection options:

  • All rows
  • First row
  • Last row
  • Top # rows

Order by configures column name to decide the order, and the ordering options are based on the column data type.

  • Alphabetical order (A → Z or Z → A)
  • Numerical order (lowest to highest or highest to lowest)
  • Timestamp (Earliest to latest or latest to earliest)

Formatting configures the table row-column formatting as follows:

OptionDescription
Multiple rows per profileAllows multiple rows for each profile
Transpose rows to columnsConverts rows into columns.

Consider the following source table sample with attribute and behavior configurations as follows:
Source Table:

Attribute Configuration

Behavior Configuration

image2023-6-23_17-4-29.png

Output Examples

The following images demonstrate the example output table based on the row selection in Export.

All rows

For each profile, all rows are activated.

First row

Each profile's first record is activated.

Last row

Each profile's last record is activated.

Top # rows

If # is set to 3, the top three rows for each user profile is activated.