LoyaltyProgram
object type
A LoyaltyProgram — the points engine's group-scoped rule master: members earn points on net merchandise spend (floor(base × earnRate.points ÷ earnRate.perMinor) — floor once at the order level over the final post-redemption discounted taxable bases, storedValue lines excluded) and redeem them as a pre-tax discount at the step-2 position 4. currency is explicit + immutable at birth. Earn multipliers compound multiplicatively across three families — tier × active bonus window × MAX — each family ≤ 8 rows. Org participation is the canned-pool selection (organizationIds absent = every org in the group). At most 8 active per org group. Doom is gated by non-doomed members (doom the members first); deactivate stays free. Tier assignment is a manual member edit v1; points expiry/transfer, redemption caps, ecom/non-sale loyalty and fraud velocity are the named deferrals.
Fields
| Field | Type | Notes |
|---|---|---|
id | ID ID! | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
sysId | String String! | The human-readable id, shaped like LP-… — stable for the record’s life. |
type | String String! | The kind of record — always LoyaltyProgram here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The record’s current state — one of active, inactive or doomed. |
parentId | ID ID! | The parent org group; for a LoyaltyProgram parentId === rootId. |
rootId | ID ID! | The id of your organization group — every record of yours carries the same one. |
createdAt | String String! | When the record was created, as a UTC timestamp. |
updatedAt | String String! | When the record last changed, as a UTC timestamp. |
revisionNum | Int Int! | How many times this record has been edited; the first save is 0. |
revision | ID ID! | The id of the record’s current edit — send it back with a change so an edit made in the meantime is refused instead of overwritten. |
refCaptions | RefCaption [RefCaption!]! | The captions of the records this one refers to, composed for you — one row per referenced id; see RefCaption. |
currency | String String! | The program earn/redeem currency — a platform-registry code inside the union of the group's organizations' allowed sets; explicit + immutable at birth. |
earnRate | LoyaltyRate LoyaltyRate! | Earn points per perMinor of eligible spend. |
redeemRate | LoyaltyRate LoyaltyRate! | points convert to perMinor of pre-tax discount value. |
earnMultipliers | LoyaltyEarnMultiplier [LoyaltyEarnMultiplier!] | Category/product earn multipliers — matching lines take the MAX row; compounds with tier × bonus. |
bonusWindows | LoyaltyBonusWindow [LoyaltyBonusWindow!] | Time-boxed bonus-earn windows (≤ 8; both bounds required, half-open) — overlapping windows take the MAX; a program rule, deliberately NOT a promotion effect. |
tiers | LoyaltyTier [LoyaltyTier!] | Named tiers (≤ 8; unique names) — config + benefit math ship v1; assignment is a manual member edit and auto-evaluation is the deferral. |
organizationIds | ID [ID!] | The canned-pool org selection — absent = every org in the group participates. |
startAt | String String! | The half-open window start (UTC ISO-8601; kit-stamped NOW when omitted at create) — immutable at birth (the history anchor). |
endAt | String | The half-open window end — absent = evergreen; [startAt, endAt) is an evaluation gate. |