AlmondTill/G3N API

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

FieldTypeNotes
idID ID!The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it.
sysIdString String!The human-readable id, shaped like LP-… — stable for the record’s life.
typeString String!The kind of record — always LoyaltyProgram here.
captionString String!The record’s display name — what people see it called.
statusString String!The record’s current state — one of active, inactive or doomed.
parentIdID ID!The parent org group; for a LoyaltyProgram parentId === rootId.
rootIdID ID!The id of your organization group — every record of yours carries the same one.
createdAtString String!When the record was created, as a UTC timestamp.
updatedAtString String!When the record last changed, as a UTC timestamp.
revisionNumInt Int!How many times this record has been edited; the first save is 0.
revisionID 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.
refCaptionsRefCaption [RefCaption!]!The captions of the records this one refers to, composed for you — one row per referenced id; see RefCaption.
currencyString String!The program earn/redeem currency — a platform-registry code inside the union of the group's organizations' allowed sets; explicit + immutable at birth.
earnRateLoyaltyRate LoyaltyRate!Earn points per perMinor of eligible spend.
redeemRateLoyaltyRate LoyaltyRate!points convert to perMinor of pre-tax discount value.
earnMultipliersLoyaltyEarnMultiplier [LoyaltyEarnMultiplier!]Category/product earn multipliers — matching lines take the MAX row; compounds with tier × bonus.
bonusWindowsLoyaltyBonusWindow [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.
tiersLoyaltyTier [LoyaltyTier!]Named tiers (≤ 8; unique names) — config + benefit math ship v1; assignment is a manual member edit and auto-evaluation is the deferral.
organizationIdsID [ID!]The canned-pool org selection — absent = every org in the group participates.
startAtString String!The half-open window start (UTC ISO-8601; kit-stamped NOW when omitted at create) — immutable at birth (the history anchor).
endAtStringThe half-open window end — absent = evergreen; [startAt, endAt) is an evaluation gate.

Used by