Promotion
object type
A Promotion — the rule-based discount engine that emits source=promo line discount entries at the step-2 position 3 (after manual + coupon; the pipeline math was position-complete from birth — the build animates the dormant slot, the pattern). Resolution is strict no-stack. Emissions are absolute amount entries computed to replay verbatim in the pipeline; order-target effects pre-allocate largest-remainder over the matched lines only. Redemptions count per order in the place/accept transaction; a capped-out promotion silently stops firing. At most 128 active per org group.
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 PM-… — stable for the record’s life. |
type | String String! | The kind of record — always Promotion 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 Promotion 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. |
effect | PromotionEffect PromotionEffect! | The canned effect — wholesale-replace on edit; free_gift/free_shipping are the named deferrals (create-refused VALIDATION/UNSUPPORTED). |
scope | PromotionScope | Where it fires. |
productScope | PromotionProductScope | What product lines match. |
cartConditions | PromotionCartConditions | When it fires. |
startAt | String String! | The half-open window start (UTC ISO-8601; kit-stamped NOW when omitted at create — the sale-price stamp law). |
endAt | String | The half-open window end — absent = evergreen (until deactivated); [startAt, endAt) is an evaluation gate. |
priority | Int Int! | Deterministic resolution ordinal. |
exclusive | Boolean Boolean! | An exclusive promotion applies only to promo-free lines and permanently blocks its lines. |
combinableGroup | String | Merchant-authored stacking tag — two promotions stack on a line IFF they share this value; absent = never combines. |
maxDiscountPerLineMinor | Int | Per-promotion self-cap: Σ emission per line. |
maxDiscountPerOrderMinor | Int | Per-promotion self-cap: Σ emission per order. |
totalRedemptionsCap | Int | Total-redemption cap. |
couponGated | Boolean Boolean! | True ⇒ evaluates only while an attached, valid trigger Coupon references it — never auto-fires. |
code | String | Optional mutable merchant reference code; uniqueness NOT enforced. |