Configure Earn Rule Condition

When a Member performs the Activity Type specified for an Earn Rule, the platform checks the Condition, which is represented as a logical expression. The Earn Rule is applied only if this Condition is satisfied.

Note: The use of Conditions in an Earn Rule is optional. If a Condition is not defined, the Earn Rule is assumed to always apply whenever a Member performs the assigned Activity Type.

A Condition consists of one or more logical statements (called Rules) joined with logical operators (AND / OR). An Earn Rule can optionally include multiple Conditions.

To define the Earn Rule Condition:

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

  2. Optionally, search for the desired Earn Rule (see Search for an Earn Rule for more information on the available search options).

  3. Optionally, expand an Earn Rule Group by clicking the Expand icon next to its name.

  4. Within the Condition column of the desired Earn Rule, click the Edit icon. The Conditions pop-up window is displayed.

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

  2. 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.

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

  5. 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.

  6. Optionally, to delete a condition, click Remove Condition.

  7. Optionally, to define another condition, click Add Condition and repeat the above steps. Multiple conditions are always joined with an AND operator.

  8. Click Save. The Condition logic is displayed within the Condition column for this Earn Rule.