Earn Rules

Overview

Earn Rules specify how Members earn metrics (such as reward points) for different Activity types. Earn Rules are typically used by clients who have an "earn and burn" style program, in which Members makes purchases in order to earn points. Members can then spend those points on Rewards, or to make other purchases.  

An Earn Rule comprises the following elements:

  • Activity Type: An action that a Member must take, such as a purchase.

  • Metric: The metric whose value is calculated by this Earn Rule.

  • Condition: If a condition is specified, the Earn Rule is applied only if the condition is true.

  • Calculation: The earned metric value from this Rule; note that this value may combine with the result of other Earn Rules for determining the final result.

  • Status: The life cycle status of the Earn Rule, including its effectivity period.

Calculations and Conditions can be written as Groovy expressions. You can use Calculation Functions to encapsulate common scenarios and to simplify the process of authoring Earn Rules. Further, custom encapsulation of Calculation or Condition scenarios can be written as Member Functions. Many rule calculations may be accomplished as a lookup from a spreadsheet of key/value pairs.

Examples

Below are several examples of common Earn Rules.

Description: For every point-of-sale Purchase, earn 1 Reward Point for each $1 spent.

  • Activity Type: PoS Purchase

  • Metric: Reward Points

  • Condition: Empty

  • Calculation:

getActivityValue('amount')

Description: Give a 15 Reward Point bonus for purchases more than $200.

  • Activity Types: PoS Purchase

  • Metric: Reward Points

  • Condition:

getActivityValue('amount') >= 200

  • Calculation: 15

Description: Give different Reward Points for items purchased. The Lookup table "point_lookup" defines how many points to give for every dollar spent for items in different categories. The result in the lookup is stored in the column "point_factor." The value in "point_factor" in the Lookup table needs to be multiplied by the amount spent on the item.

  • Activity Types: PoS Purchase

  • Metric: Reward Points

  • Condition: Empty

  • Calculation:

sumActivityItems({item -> getLookupValue ('point_lookup', item.category, 'point_factor') * item.amount})

Rule Groups

The platform allows you to assign Earn Rules to a Rule Group. Rule Groups serve as an organizational function, and also as tool to implement common loyalty scenarios. For more details on setting up Rule Groups, please see Earn Rule Settings.

Access

To access the Earn Rules screen, select Rules from the Main Navigation Menu, then select Earn Rules from the Sub-Category menu.

Features

The Earn Rules screen provides the following features:

Searching and Sorting

Create a New Earn Rule

Set Status and Effectivity Period

Deploy Earn Rules Metadata

View Deployed Earn Rules Metadata

Rearrange Earn Rules

Edit Earn Rule Properties

Delete an Earn Rule

Copy an Earn Rule

Download JSON