# 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). Org restriction is JUNCTION-LESS: the scope axes (channels/LFs/orgs) gate WHERE it fires; productScope (the CollectionPredicate VERBATIM + inclusions/exclusions + a Collection ref) gates WHAT lines match — ABSENT productScope = ALL product lines (the sitewide sale; open_item lines never match); cartConditions gate WHEN. Windows are half-open \[startAt, endAt) — an EVALUATION gate, never FSM states (advance scheduling = create active with a future startAt; absent endAt = evergreen). Resolution is STRICT no-stack (priority asc, id asc; combinableGroup opts IN; exclusive blocks its lines). 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](/types/#scalars) `ID!` | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
| `sysId` | [String](/types/#scalars) `String!` | The group-scoped human-facing system id (PM-…). |
| `type` | [String](/types/#scalars) `String!` | The kind of record — always `Promotion` here. |
| `caption` | [String](/types/#scalars) `String!` | The record’s display name — what people see it called. |
| `status` | [String](/types/#scalars) `String!` | The FSM state: active \| inactive \| doomed. |
| `parentId` | [ID](/types/#scalars) `ID!` | The parent org group; for a Promotion parentId === rootId. |
| `rootId` | [ID](/types/#scalars) `ID!` | The org-group family root. |
| `createdAt` | [String](/types/#scalars) `String!` | When the record was created, as a UTC timestamp. |
| `updatedAt` | [String](/types/#scalars) `String!` | When the record last changed, as a UTC timestamp. |
| `revisionNum` | [Int](/types/#scalars) `Int!` | How many times this record has been edited; the first save is 0. |
| `revision` | [ID](/types/#scalars) `ID!` | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
| `refCaptions` | [RefCaption](/types/RefCaption/) `[RefCaption!]!` | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
| `effect` | [PromotionEffect](/types/PromotionEffect/) `PromotionEffect!` | The canned effect — wholesale-replace on edit; free_gift/free_shipping are the NAMED deferrals (create-refused VALIDATION/UNSUPPORTED). |
| `scope` | [PromotionScope](/types/PromotionScope/) | WHERE it fires. |
| `productScope` | [PromotionProductScope](/types/PromotionProductScope/) | WHAT product lines match. |
| `cartConditions` | [PromotionCartConditions](/types/PromotionCartConditions/) | WHEN it fires. |
| `startAt` | [String](/types/#scalars) `String!` | The half-open window start (UTC ISO-8601; kit-stamped NOW when omitted at create — the sale-price stamp law). |
| `endAt` | [String](/types/#scalars) | The half-open window end — ABSENT = evergreen (until deactivated); \[startAt, endAt) is an EVALUATION gate. |
| `priority` | [Int](/types/#scalars) `Int!` | Deterministic resolution ordinal. |
| `exclusive` | [Boolean](/types/#scalars) `Boolean!` | An exclusive promotion applies only to promo-free lines and permanently blocks its lines. |
| `combinableGroup` | [String](/types/#scalars) | Merchant-authored stacking tag — two promotions stack on a line IFF they share this value; absent = never combines. |
| `maxDiscountPerLineMinor` | [Int](/types/#scalars) | Per-promotion self-cap: Σ emission per LINE (minor units). |
| `maxDiscountPerOrderMinor` | [Int](/types/#scalars) | Per-promotion self-cap: Σ emission per ORDER (largest-remainder re-clamp to EXACTLY the cap). |
| `totalRedemptionsCap` | [Int](/types/#scalars) | Total-redemption cap. |
| `couponGated` | [Boolean](/types/#scalars) `Boolean!` | TRUE ⇒ evaluates ONLY while an attached, valid trigger Coupon references it — never auto-fires. |
| `code` | [String](/types/#scalars) | Optional mutable merchant reference code; uniqueness NOT enforced. |

## Used by

- [createPromotion](/reference/promotion/createPromotion/)
- [deactivatePromotion](/reference/promotion/deactivatePromotion/)
- [doomPromotion](/reference/promotion/doomPromotion/)
- [promotion](/reference/promotion/promotion/)
- [promotions](/reference/promotion/promotions/)
- [reactivatePromotion](/reference/promotion/reactivatePromotion/)
- [updatePromotion](/reference/promotion/updatePromotion/)
