Help Center/Purchases, Rewards & Accumulation/How to add and edit rules in an accrual stack draft
Purchases, Rewards & Accumulation•Last updated: 2026-10-20•4 min read

How to add and edit rules in an accrual stack draft

Rules are IF conditions on typed facts with THEN and ELSE actions. Only a DRAFT is editable; each change is saved to the draft immediately.

Have questions or need step-by-step guidance on this topic?

Ask AI Copilot

Step-by-Step Procedure

1

Set stack settings

"Mode" is "First match wins" or "Evaluate every rule". "Max accrual per event (µ)" caps one event. Amounts are micro-units (1 000 000 = 1.00) and rates are ppm (3000 = 0.3%). Changing either saves the draft at once.

2

Click "Add rule" (or the pencil icon)

Give a unique rule id, a name, a priority (lower runs first) and the "enabled" switch.

3

Build the IF

Choose "ALL of" or "ANY of", click "Condition" and set a fact (for example role), an operator (eq, neq, gt, gte, lt, lte, in, nin, exists) and a value. Use "Advanced JSON" for nested all, any and not.

4

Build THEN and ELSE

Click "Action" and choose ACCRUE, SKIP, HOLD or STOP. ACCRUE needs a ledger account and either "rate × basis" (basis fact plus ppm) or "fixed" micro-units, with an optional cap. SKIP and HOLD need a reason.

5

Click "Save rule"

An invalid stack is refused with the list of errors. The trash icon deletes a rule at once, with no confirmation.

Expected Operational Outcome

The rule appears in the stack in priority order, rendered as IF / THEN / ELSE.

Troubleshooting & Failure Modes

Symptom: Error "Invalid stack: ..."
Likely Cause: A rule id is duplicated or an action is incomplete.
Resolution: Fix the listed problem and save again.

Was this guide helpful?

Help us refine our platform documentation