Skip to main content
The Rule Engine is the core of your loyalty program’s incentive structure. It lets you create conditions-based rules — “if a transaction meets these criteria, apply this reward” — without any code. Rules support simple flat-rate earning, tiered multipliers, milestone bonuses, birthday cashback, and time-targeted promotions.

How it works

When a transaction arrives (via API or file upload), Loyalife evaluates all active rule groups whose linked segment includes the transacting member. Matching rules determine how many points, what cashback percentage, or what bonus applies. Results are posted to the member’s account immediately. Example — retail loyalty program:
  • Earn 2 points per ₹1 spent at any time
  • Earn an additional 1% cashback on transactions above ₹5,000
  • Earn 500 bonus points on the member’s birthday month
  • Earn a 25% cashback on every 20th order in a calendar month
Each is a separate rule inside the same rule group. All evaluate simultaneously for each transaction.
Rule Engine screen with rule groups shown as tabs at the top and individual rules listed in sequence order within the selected group, with toggle controls to activate or deactivate each rule

Core components

Attributes

Data variables that carry information about transactions and members. Attributes are the inputs that rules evaluate.

Rule Groups

Named containers that hold related rules. Can be linked to a specific segment so rules only apply to a targeted audience.

Earning Rules

IF/THEN logic statements: if conditions are met, award the defined reward. Each rule has conditions, a reward type, and optional limits.

Building an earning rule

IF conditions

Each condition has three parts: Multiple conditions combine with AND (all must be true) or OR (any must be true). Every rule condition evaluates a combination of transaction attributes and member attributes — what happened in the transaction, and who the member is. This is what makes the Rule Engine powerful: a single rule can simultaneously check “was the transaction amount above ₹5,000?” (transaction attribute) and “is the member in the Gold tier?” (member attribute) and “has the member transacted more than 10 times this month?” (aggregate attribute). Supported attribute categories:

Operators

Date and time conditions

The Transaction Date attribute supports combined date and time values. The date picker opens with a calendar plus an embedded time selector (HH:MM, 24-hour format) below the grid. For the between operator, both start and end pickers include their own time selectors. Existing rules with date-only values continue to work as-is — they are treated as 00:00 by default. Example use cases:

Dynamic attribute comparisons — birthday and anniversary rules

Instead of comparing an attribute to a fixed value, you can compare it to another member attribute. This enables rules like birthday cashback or card anniversary bonuses. Birthday cashback example:
Constraints for dynamic comparisons: Edge cases for birthday rules:

Milestone rewards (Is Multiple Of)

The Is Multiple Of operator fires a rule every time an aggregate count or sum hits a multiple of your configured value. The current transaction is included in the aggregate before evaluation. Reversals and refunds adjust the aggregate automatically. Example — reward every 20th order per month:
This fires on the 20th, 40th, 60th order, and so on.
An implicit Count > 0 guard is added automatically when you use Is Multiple Of to prevent zero from incorrectly matching (since 0 is technically a multiple of any number).

THEN reward

Value type for the THEN condition:

Restrictions

Each earning rule can carry one or more restrictions that limit when and how much the rule fires. Add restrictions from the Restrictions section of the rule builder. Combining restrictions: Multiple restrictions are evaluated together with AND logic — a transaction must satisfy all active restrictions for the rule to fire. For example, a rule restricted to a date range AND specific product codes will only fire for qualifying products within that time window.
Restrictions layer on top of IF conditions, not instead of them. A transaction must first pass all IF conditions, then pass all active restrictions, before the THEN reward is applied.

Limits and caps

Activating and deactivating rules

Changes to rule status (active/inactive) take effect immediately for new transactions. They do not retroactively apply or reverse points already awarded.

Troubleshooting

A rule is not firing on expected transactions.
  • Confirm the rule group is set to Active.
  • Check whether the group has a linked segment — the transacting member must be in that segment.
  • Review all condition operators and values carefully, especially date formats and time values.
  • Check whether a group-level cap for this member has already been reached.
A member is earning on transactions that should be excluded.
  • Identify all active rule groups with no segment restriction — they apply to every member.
  • Look for overlapping conditions that inadvertently match.
Birthday rule is not firing.
  • Confirm the member’s Date of Birth is populated in their profile.
  • Members born on February 29 receive no birthday reward in non-leap years.
  • If the DOB was updated mid-month after the reward was already issued, the new date takes effect the following year.