LoyaltyMember
object type
A LoyaltyMember — ONE enrollment of ONE customer identity into ONE LoyaltyProgram (parentId = the program). Enrollment requires identity: the inline customer block with email required (trim+lowercase-normalized — anonymous/walk-in cannot earn); the (program × normalized email) uniq marker reserves IN the create transaction — a live holder refuses CONFLICT/MEMBER_EXISTS naming the holder (the email is never echoed), while a doomed member's identity re-enrolls fresh. pointsBalance is the cached LoyaltyPointsEntry ledger sum (PK=loyledger#<memberId>), stamped in the same transaction as every entry, with every draw conditioned balance ≥ draw — points never go negative (CONFLICT/INSUFFICIENT_POINTS names live figures) and cap at 1000000000. Earn/redeem ride the Order place transaction; cancel claws back IN the cancel transaction (spent-below-earned refuses the cancel); returns claw earn + restore redemption exactly off the entries' per-line details in the refund flip transaction. adjustLoyaltyPoints is the only manual points surface. Doom is gated by CONFLICT/BALANCE_OUTSTANDING while points remain (zero via reason-coded adjust first); tier assignment is a manual edit v1.
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 LM-… — stable for the record’s life. |
type | String String! | The kind of record — always LoyaltyMember 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 LoyaltyProgram — NOT the family root; rootId anchors the org group. |
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. |
customer | LoyaltyCustomer LoyaltyCustomer! | The enrollment identity. |
pointsBalance | Int Int! | The cached ledger sum — stamped in the same transaction as every LoyaltyPointsEntry; never negative; never directly editable (adjust/earn/redeem are the only points surfaces). |
currentTier | String | The assigned tier name. |
priceGroupId | ID | The assigned CustomerPriceGroup. / bind groups per their locks; the Consumer binding supersedes. |
consumerId | ID | The Consumer identity bridge. The coherence gate rides it: an order naming both a member and a consumer refuses when this bridge points at a different consumer; a consumer-named order resolves pricing from the consumer binding — this member carrier stands only on member-named-without-consumer orders. |