Point Definition Rates


Overview

Point Definition Rates define how many points a profile earns for a given transaction. Each rate is linked to a Point Definition by its handle, and can be scoped by location, region, country, time window, and JSON Logic conditions on the profile or product — allowing complex earn programs with minimal configuration.


How Point Definition Rates Work

Supported Actions

Point Definition Rates are applied by two actions:

ActionPoint TypeUse Case
Create Point (createPoint)Standard Point — tracks value_initial and value_remainingRedeemable loyalty points with optional expiry
Create Tier Point (createTierPoint)Tier Point — tracks a single valueProgress points used for tier qualification; no expiry

Both actions use the same RateResolver to find the applicable rate, and both store the resolved rate's details in the point's meta field for audit purposes.

Rate Resolution

Both CreatePoint and CreateTierPoint resolve a rate using the same algorithm:

  1. Fetch all published, non-archived rates matching the Point Definition handle
  2. Filter by active time window (start_time ≤ now ≤ end_time)
  3. Filter by location, region, and country — rates with NULL values act as catch-alls
  4. Evaluate profile_conditions against the profile context (JSON Logic)
  5. Evaluate product_conditions against the product/transaction context (JSON Logic)
  6. Rank remaining rates by specificity score (more specific scoping = higher priority)
  7. Apply rate_priority to break ties (product prefers rates with product conditions; profile prefers rates with profile conditions)
  8. Return the highest-ranked matching rate

Rate resolution is opt-in. It only runs when check_rate = true is passed to the action.

Specificity Scoring

When multiple rates match, the most specific one wins. Specificity is calculated as:

Matched fieldScore
location_id matches+1
region_id matches+1
country_iso_2 matches+1
code matches+1

A rate with all four fields set outranks a catch-all rate with none set.

Point Calculation

Create Point:

points = round(round(base_amount) × rate)

Falls back to rate = 1 if no rate is resolved and no direct rate argument is provided.

Create Tier Point:

points = round(base_amount × rate)

Falls back to the raw base amount (no multiplier applied) if no rate is resolved. Does not support a direct rate argument override.

ExampleBase AmountRatePoints Earned
Standard earn$1001.0100
Half earn$1000.550
Double earn$1002.0200
No rate resolved (Tier Point)$100100

Point Issuance (Pending Period)

Points are not always immediately active. The issue_period and issue_period_type fields on the rate control when a point transitions from pending to active. This applies to both CreatePoint and CreateTierPoint when accrued_at is provided.

issue_period_typeBehaviour
hoursActive after N hours
daysActive after N days (end of day)
weeksActive after N weeks (end of day)
monthsActive after N months (end of day)
yearsActive after N years (end of day)
absolute_dateActive on a fixed date set in issue_absolute_expiry
absolute_weekActive on the Nth weekday, N weeks from earn
absolute_monthActive on the Nth day of the month, N months from earn

Example: issue_period = 30, issue_period_type = days — points become spendable 30 days after the transaction.

If no accrued_at is provided, the point is issued immediately (issued_at = now).


Configuring a Point Definition Rate

Prerequisites

  • A Point Definition must already exist. The rate's handle is inherited from the definition you select.
  • The Point Definition must be referenced in a CreatePoint or CreateTierPoint action on a trigger reaction, with check_rate = true enabled on the action.

Steps

  1. Navigate to Configuration → Rates
  2. Select the Point Definition tab
  3. Click Add rate
  4. Fill in the form:

Rate Details

FieldRequiredDescription
NameYesDisplay label for this rate
Point DefinitionNoSelect the definition — automatically sets the rate handle
RateYesEarn multiplier, e.g. 0.5 = half a point per dollar
RegionNoLimit this rate to a specific region
CountryNoLimit to a country within the selected region
LocationNoLimit to a specific store or location
CodeNoOptional code for additional scoping
PublishedNoMust be toggled on for the rate to be active
ArchivedNoToggle on to soft-delete the rate

Configuration

FieldRequiredDescription
Start TimeNoRate becomes active at this datetime
End TimeNoRate expires at this datetime
Issued PeriodNoNumber of periods before points are issued (e.g. 30)
Issued Period TypeNoUnit for the period: Days, Weeks, Months, etc.
Absolute ValueConditionalRequired when period type is Absolute Date, Absolute Week, or Absolute Month
Profile ConditionsNoJSON Logic evaluated against the profile — rate only applies if conditions pass
Product ConditionsNoJSON Logic evaluated against the transaction/product — rate only applies if conditions pass
Earn InstructionsNoHuman-readable description of earn rules
Internal NotesNoInternal notes, not visible to profiles
  1. Click Save

Conditions Example

Profile Conditions — award double points only for Gold tier members:

{ "==": [{ "var": "tier.handle" }, "gold"] }

Product Conditions — award points only for transactions in a specific category:

{ "==": [{ "var": "sku" }, "s100001"] }

Rates with no conditions apply unconditionally. Rates with conditions require the corresponding context to be passed by the triggering action.

{ "==": [{ "var": "sku" }, "s100001"] }

Rates with no conditions apply unconditionally. Rates with conditions require the corresponding context to be passed by the triggering action.