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?
Step-by-Step Procedure
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.
Click "Add rule" (or the pencil icon)
Give a unique rule id, a name, a priority (lower runs first) and the "enabled" switch.
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.
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.
Click "Save rule"
An invalid stack is refused with the list of errors. The trash icon deletes a rule at once, with no confirmation.
The rule appears in the stack in priority order, rendered as IF / THEN / ELSE.
Troubleshooting & Failure Modes
Was this guide helpful?
Help us refine our platform documentation