Segment Details: Rules

Overview

The Rules tab of the Segment Details screen allows you to define the conditions that specify the inclusion criteria for the Segment. The features available in this section vary depending on the selected Execution Type of the Segment (EDP or Golden Record).

Note: For Golden Record-type Segments, if you checked the External option, the Rules tab is not displayed. 

Features

The features and options available from the Rules section are described below.

Segment Type: EDP

The EDP Segment Execution Type uses aggregated data, and does not support dynamically-calculated Segments. This Execution Type is primarily intended for use cases where you need to calculate all the individuals that belong in a particular Segment. For Segments of type EDP, the Rules tab provides the following features: 

 Define Segment Rules - Simple

Click hereClick here

If you selected Simple as the Authoring Mode in the Segment properties, the Rules tab provides a user-friendly interface for defining the Segment rules.

  1. From the menu on the left-hand side of the screen, select an Attribute category. The screen is refreshed to show the configuration options for that Attribute category.

  2. Select an Attribute, and define the condition. If you need to start over defining this condition, click reset

  3. Click save. The platform refreshes the audit chart on the right, which indicates the number of selected records out of the total population of your database. The logical condition is displayed beneath the audit chart. At any time, you can also click the Refresh icon within this chart to update the count. 

Note: Above the audit chart, click "Show Query" to see the code behind the Segment condition. 

  1. Repeat the above steps to add more logical conditions to the Segment. Each condition you add will refresh the count on the right. By default, logical conditions are joined by an AND operator, meaning that all conditions must be satisfied for an individual to be selected by the Segment. See "Conditions" below for details on how to use an OR operator instead. 

  2. To remove a logical condition from the Segment, click the "x" icon next to the condition description beneath the audit chart. Optionally, click clear all to remove all logical conditions from the Segment. 

Conditions

The Conditions option in the left-hand menu allows you to define more sophisticated Segment logic that's not supported by the Simple user interface defined above:

  1. Click the Add icon, then select Add Rule. The platform adds a new blank row for defining the Rule Condition. 

  2. From the first drop-down menu, select the desired Attribute. This menu is populated with all of the different Attributes for building a condition, organized by Attribute Type.

  3. Select a mathematical operator. The available operators will vary based on the data type of the selected Attribute. 

  4. Enter or select a value. 

  5. Some attribute types allow you to define additional criteria, such as a date range, or a channel type, for example. Select or enter the additional criteria. 

  6. Repeat the above steps as needed to define more Rule Conditions. If you need to delete a Rule Condition, click the Delete icon next to it. 

  7. Once you define more than one Rule Condition, select the logical operator. From the "Include customers that meet" drop-down menu, select either: 

  • All of the following: The conditions are processed with a logical 'AND' operator such that all conditions must be true for an individual to be included. 

  • Some of the following: The conditions are processed with a logical 'OR' operator such that at least one of the conditions must be true for an individual to be included. 

  1. Click save.  

Optionally, you can organize Rule Conditions into a Rule Group. The Rule Group has its own AND / OR operator which allows you to define more complex, sophisticated Rules. To create a Rule Group:

  1. Click the Add icon, then select Add Rule Group. The platform adds a new Group with a blank row for defining the logical condition within the Group.

  2. Follow the steps as described above for creating Rule Conditions within the Group. 

  3. Select the logical operator to use for the Conditions within the Rule Group. 

  4. Repeat the above steps as needed to define more Rule Conditions within the Group. 

  5. Repeat the above steps as needed to define more Rule Groups. You can use the Add Rule Group option at either the parent level, or within an existing Rule Group, thereby allowing you create a "nested" Group. The platform indents Rule Groups to help you visually identify the hierarchy of Groups.

  6. If you need to delete a Rule Group (and all Rules within it), click the Delete icon next to it. 

  7. Click save

 

 Define Segment Rules - Advanced

Click hereClick here

If you selected Advanced as the Authoring Mode in the Segment properties, the Rules tab allows you to submit a query to define the Segment logic.

  1. In the code editor field, enter your query logic.

  2. Click save.

 

 Define Segment Rules - Traditional

Click hereClick here

If you selected Traditional as the Authoring Mode in the Segment properties, the Rules tab allows you to define the Segment logic as a series of Rules Conditions, which optionally may be organized into Rule Groups. This method allows you to define more sophisticated Segment logic not supported by the Simple Authoring Mode. 

  1. Click the Add icon, then select Add Rule. The platform adds a new blank row for defining the Rule Condition. 

  2. From the first drop-down menu, select the desired Attribute. This menu is populated with all of the different Attributes for building a condition, organized by Attribute Type.

  3. Select a mathematical operator. The available operators will vary based on the data type of the selected Attribute. 

  4. Enter or select a value. 

  5. Some attribute types allow you to define additional criteria, such as a date range, or a channel type, for example. Select or enter the additional criteria. 

  6. Repeat the above steps as needed to define more Rule Conditions. If you need to delete a Rule Condition, click the Delete icon next to it. 

  7. Once you define more than one Rule Condition, select the logical operator. From the "Include customers that meet" drop-down menu, select either: 

  • All of the following: The conditions are processed with a logical 'AND' operator such that all conditions must be true for an individual to be included. 

  • Some of the following: The conditions are processed with a logical 'OR' operator such that at least one of the conditions must be true for an individual to be included. 

  1. Click save.  

Optionally, you can organize Rule Conditions into a Rule Group. The Rule Group has its own AND / OR operator which allows you to define more complex, sophisticated Rules. To create a Rule Group:

  1. Click the Add icon, then select Add Rule Group. The platform adds a new Group with a blank row for defining the logical condition within the Group.

  2. Follow the steps as described above for creating Rule Conditions within the Group. 

  3. Select the logical operator to use for the Conditions within the Rule Group. 

  4. Repeat the above steps as needed to define more Rule Conditions within the Group. 

  5. Repeat the above steps as needed to define more Rule Groups. You can use the Add Rule Group option at either the parent level, or within an existing Rule Group, thereby allowing you create a "nested" Group. The platform indents Rule Groups to help you visually identify the hierarchy of Groups.

  6. If you need to delete a Rule Group (and all Rules within it), click the Delete icon next to it. 

  7. Click save

 

Segment Type: Golden Record

The Golden Record Execution Type uses a "wide row" design, meaning that everything about an individual is available within a single row. This Execution Type is primarily intended for use cases where you need to calculate to which Segments a single individual belongs. For Segments of type Golden Record, the Rules tab provides the following features: 

 Create Rule Conditions

Click hereClick here

  1. Click the Add icon, then select Add Rule. The platform adds a new blank row for defining the Rule Condition. 

  2. From the first drop-down menu, select the desired Attribute. This menu is populated with all of the different Attributes for building a condition, organized by Attribute Type.

  3. Select a mathematical operator. The available operators will vary based on the data type of the selected Attribute. 

  4. Enter or select a value. 

  5. Some attribute types allow you to define additional criteria, such as a date range, or a channel type, for example. Select or enter the additional criteria. 

  6. Repeat the above steps as needed to define more Rule Conditions. If you need to delete a Rule Condition, click the Delete icon next to it. 

  7. Once you define more than one Rule Condition, select the logical operator. From the "Include customers that meet" drop-down menu, select either: 

  • All of the following: The conditions are processed with a logical 'AND' operator such that all conditions must be true for an individual to be included. 

  • Some of the following: The conditions are processed with a logical 'OR' operator such that at least one of the conditions must be true for an individual to be included. 

  1. Click save.  

Optionally, you can organize Rule Conditions into a Rule Group. The Rule Group has its own AND / OR operator which allows you to define more complex, sophisticated Rules. To create a Rule Group:

  1. Click the Add icon, then select Add Rule Group. The platform adds a new Group with a blank row for defining the logical condition within the Group.

  2. Follow the steps as described above for creating Rule Conditions within the Group. 

  3. Select the logical operator to use for the Conditions within the Rule Group. 

  4. Repeat the above steps as needed to define more Rule Conditions within the Group. 

  5. Repeat the above steps as needed to define more Rule Groups. You can use the Add Rule Group option at either the parent level, or within an existing Rule Group, thereby allowing you create a "nested" Group. The platform indents Rule Groups to help you visually identify the hierarchy of Groups.

  6. If you need to delete a Rule Group (and all Rules within it), click the Delete icon next to it. 

  7. Click save

Optionally, instead of defining a condition through the "logic builder" user interface described above, you can enter the expression code:

  1. In the "Advanced Expression" field, enter the desired code.

 

 Test Member Count

Click hereClick here

To test the Segment logic to see how many Members it selects:

  1. Click test member counts. The button label changes to counting while the platform executes the Segment logic.

  2. When finished, the platform displays a pop-up box in the bottom-right corner of the screen, containing the number of customers selected out of the total number of customers in your account.

Note: This count also reflects customers who were manually included in, or excluded from, the Segment on the Member Overrides tab.

To see the exact list of customers selected by the Segment, you must run the Segment logic (see Results for more details on this process).

 

 View Expression Logic

Click hereClick here

EDP allows you to view the underlying code used to express a Rule Condition's logic. This feature is useful if you're new to expressions, as it will help you become more proficient in writing expressions within Segments, or within other areas of the platform.

To view the expression logic:

  1. Click show expression. A pop-up box is displayed and populated with the expression logic.

 

Back to Segment Details