ÃÛ¶¹ÊÓƵ

Managing Trait Rules managing-trait-rules

In Trait Builder, the Expression Builder lets you create and test rules that establish audience qualification requirements. Rules consist of key-value pairs such as color == blue or price > 100. Comparison operators establish the relationship between keys and values. Boolean expressions determine the relationship between rule groups.

Main Signal Rules Features Described

  1. The Expression Builder or Code View tabs provide an overview of the rules in your trait. The Expression Builder tab lets you create rules with fields and drop-down menus. The Code View lets you create rules by manually writing those expressions as code. The illustration above shows a simple trait composed of a signal that evaluates data for a qualifying condition where a product key equals a specific value, in this case color == "blue".

  2. The fields and controls in this section let you create signals from key-value pairs and set the relationship between them with a comparison operator. A key, operator, and value are required.

  3. The Data Explorer Options allow you to backfill trait realizations for your signals.

    note note
    NOTE
    This option is only available for Data Explorer customers. Contact your ÃÛ¶¹ÊÓƵ consultant for details.
  4. This section shows you an estimation of trait realizations for the past 7 days, for the signals defined in the Expression Builder, for backfilled and non-backfilled traits.

    note note
    NOTE
    This option is only available for Data Explorer customers. Contact your ÃÛ¶¹ÊÓƵ consultant for details.
  5. The test fields let you validate combinations of signal rules or the URLs that you want to use when sending data to Audience Manager.

Create a Trait Rule create-trait-rule

Rules (or expressions) consist of individual or groups of key-value pairs. Comparison operators set the relationship between key-value pairs. To create a rule,provide a key, a value, select an operator, and click Add Rule.

Complete the required fields in the Basic Information section before creating trait rules.

  1. Expand the Trait Expression section and enter a key and value name. This creates a signal.

    note note
    NOTE
    Include the c_ prefix (or any other naming convention) for key variable if your event calls send data to Audience Manager using that syntax.
  2. Select a comparison operator from the Operator dropdown. The comparison operator evaluates the relationship between the elements in a signal.

    note note
    NOTE
    The Boolean OR operator establishes the relationship between multiple signals within a group and cannot be changed.
  3. Click Add Rule. The saved rule appears in the traits workspace above the data entry fields.

Example example-trait-rule

In the example below, a user has created a new trait rule based on the product ID. To build this rule, the user provided the key productkey linked with an equals operator ( ==) to the value 2093.

Clicking Add Rule saves and moves the trait into the Expression Builder workspace.

Create a New Rule Group create-rule-group

This procedure describes how to create a new rule group.

Your trait must contain at least two rules before you can create a new rule group.

  1. Move your cursor over the rule you want to move to highlight it.

  2. Hover over the highlighted rule border.

    This automatically separates the rule from its current group and moves it into a new group.

    note note
    NOTE
    Drag a rule back to its original group if you move it unintentionally.
  3. Select a Boolean operator (AND, OR, AND NOT) from the drop-down menu to set the relationship between the rule groups.

Move Rules Between Groups move-rules-between-groups

To move a rule, click and drag it to another group.

Edit a Trait edit-trait

This procedure describes how to edit a trait.

  1. In the Traits dashboard, hover over the Actions column for the trait you want to edit. This brings up the trait management icons.

  2. Click the pencil to edit the trait.

Delete a Trait Rule delete-trait

This procedure describes how to delete a trait rule.

  1. In the Traits dashboard, hover over the Actions columns for the trait you want to edit and click the pencil icon. This brings up the trait management icons.
  2. Expand the Trait Expression section.
  3. Hover over the rule you want to delete and click the X icon. The rule is deleted immediately.
recommendation-more-help
de293fbf-b489-49b0-8daa-51ed303af695