Define Segment Rules: 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 the Segments to which a single individual belongs. 

Segment Rules define the criteria for Members to be selected by this Segment. The Rules tab presents you with the Loyalty platform's standard condition-builder interface, which you can use to define one or more Rules, then select the logical operator (AND or OR) that connects them.

This article assumes that you have already created the Segment, and configured its properties as follows (for more information, see Edit Segment Properties):

  • Execution Type: Golden Record

Define the Segment Rules

To define the Segment Rules in a Golden Record-type Segment:

  1. Select Members from the top navigation bar, then select Segments from the side navigation menu. The Segments screen is displayed.

  2. Search for and select the desired Segment (see Search for a Segment for more information on the available search options). The Segment Details screen is displayed. By default, the Rules tab is selected for EDP and Golden Record Segments, and the Results tab is selected for External Segments.

  3. Click the Add icon, then select Add Rule. The platform adds a new blank row. 

  4. The first drop-down menu is populated with all of the different object types in Loyalty that are available for use. From this drop-down menu, select one of the following object types to expand it and see the available options:

 

  1. Repeat the above steps as needed to define more Rules. Optionally, to delete a Rule, click the Delete icon next to it.

  2. Once you define more than one Rule, select the logical operator from the Include customers that meet drop-down menu: 

    • All of the following: Use an 'AND' operator such that all Rules must be true for a record to be selected. 

    • Some of the following: Use an 'OR' operator such that at least one of the Rules must be true for a record to be selected.

  3. Optionally, you can also organize Rules into Rule Groups. A Rule Group allows you to build more complex selection criteria. To create a Rule Group, click the Add icon, then select Add Rule Group. The platform creates a Group, which is represented visually as a nested box with its own operator and Add icon. Within this Group box, click the Add icon to define the Rule (or Rules) using the same process as described above. Use the toggle within the Group box to define the logical operator for the Rules within the Group. To delete an entire Rule Group, click the Delete icon just above the nested box representing the Group.

Note: By clicking the Group button inside the Group box, you can create "nested" groups.

  1. Click Save.

  1. As you define Rules through the user interface, the platform builds a Groovy expression. To see this Groovy Expression, click Show Expression. The Show Expression pop-up window is displayed. When finished, click Close.

  1. Optionally, to delete all previously defined Rules and start over from scratch, click Reset.

Evaluate the Segment Rules

After defining the Rules for your Segment, you can test that the Segment’s conditions are selecting the desired Members. When you use this test method, the platform executes the Segment Rules against a selected Member, and indicates if they would be selected or not. This feature is useful for ensuring that the Segment conditions are working as expected.

To evaluate a Member against the Segment’s Rules:

  1. Select Members from the top navigation bar, then select Segments from the side navigation menu. The Segments screen is displayed.

  2. Search for and select the desired Segment (see Search for a Segment for more information on the available search options). The Segment Details screen is displayed. By default, the Rules tab is selected for EDP and Golden Record Segments, and the Results tab is selected for External Segments.

  3. Define the Segment Rules as described above. Click Save.

  4. Click Evaluate. The Evaluate Expression pop-up window is displayed.

  1. In the Member field, type in all or part of a Member’s name, then select the desired Member from the search results.

  2. Click Evaluate.

  3. The platform displays the results. The Validity field indicates if the platform encountered any errors in the expression syntax or logic. The Result field displays True if the Member was selected by the Segment, and False if they were not selected by the Segment.

  1. Repeat the above steps to evaluate a different Member. When finished, click Close.

Test Member Count

After defining the Rules for your Segment, you can run a quick test to see how many Members the logical conditions will select. This feature is a useful method to validate that the Segment logic is working, and that it is selecting the expected number of Members.

Note: This count also reflects Members who were manually included in (or excluded from) the Segment on the Member Overrides tab. For more information, see Define Member Overrides.

To see the exact list of Members selected by the Segment, you must refresh the Segment. See Refresh a Segment for more information.

To generate a count of Members selected by the Segment Rules:

  1. Select Members from the top navigation bar, then select Segments from the side navigation menu. The Segments screen is displayed.

  2. Search for and select the desired Segment (see Search for a Segment for more information on the available search options). The Segment Details screen is displayed. By default, the Rules tab is selected for EDP and Golden Record Segments, and the Results tab is selected for External Segments.

  3. Define the Segment Rules as described above. Click Save.

  4. Click Test Member Count.

The button label changes to Counting while the platform executes the Segment logic, and the platform displays a progress bar showing the estimated completion percentage of the count process.

When the process is complete, the platform displays the number of selected Members (out of the total number of Members in your database).