AlmondTill/G3N API

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

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 PM-… — stable for the record’s life.
typeString String!The kind of record — always Promotion 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 Promotion 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.
effectPromotionEffect PromotionEffect!The canned effect — wholesale-replace on edit; free_gift/free_shipping are the named deferrals (create-refused VALIDATION/UNSUPPORTED).
scopePromotionScopeWhere it fires.
productScopePromotionProductScopeWhat product lines match.
cartConditionsPromotionCartConditionsWhen it fires.
startAtString String!The half-open window start (UTC ISO-8601; kit-stamped NOW when omitted at create — the sale-price stamp law).
endAtStringThe half-open window end — absent = evergreen (until deactivated); [startAt, endAt) is an evaluation gate.
priorityInt Int!Deterministic resolution ordinal.
exclusiveBoolean Boolean!An exclusive promotion applies only to promo-free lines and permanently blocks its lines.
combinableGroupStringMerchant-authored stacking tag — two promotions stack on a line IFF they share this value; absent = never combines.
maxDiscountPerLineMinorIntPer-promotion self-cap: Σ emission per line.
maxDiscountPerOrderMinorIntPer-promotion self-cap: Σ emission per order.
totalRedemptionsCapIntTotal-redemption cap.
couponGatedBoolean Boolean!True ⇒ evaluates only while an attached, valid trigger Coupon references it — never auto-fires.
codeStringOptional mutable merchant reference code; uniqueness NOT enforced.

Used by