MarkdownPlan
object type
A MarkdownPlan — the markdown CADENCE: a product scope (the grammar VERBATIM — predicate + inclusions/exclusions + a Collection ref) + ≤ 8 ordered effective-dated steps (percent_off ppm-EXCLUSIVE · amount_off · to_fixed; startAt strictly increasing; the LAST step MAY carry endAt = the clearance-LAPSE arm, absent = the standing far-future window). the write rule: the schedule transition pre-computes the whole price LADDER per targeted InventoryItem (base₀ = the record covering step-1's startAt, then each PRIOR RESULT — half-away rounding, every result > 0) and WRITES EVERY future-dated SalePrice up-front through the existing per-record create (splice-gated, evented, plan/step-stamped; the FIRST window per II TRIMS the covering standing record; caps: ≤ 250 items · ≤ 500 writes). The prices then move by dated-window resolution ALONE — the scheduler fires ONLY the plan's own status flips (scheduled→active at the first step's moment · active→completed after the last; a down sweeper delays ZERO price moves — the flips are observability). The live splice law PROTECTS the cadence (an external overlapping write refuses CONFLICT/PRICE_WINDOW_OVERLAP naming the plan's records). Cancel dooms the not-yet-effective plan-stamped records ONLY (effective windows are permanent price history; the step-1 trim is NOT restored). A markdown MOVES the step-1 base — promotions/loyalty/employee compose on top UNCHANGED. Update is DRAFT-only (amend-after-schedule = cancel + author anew). At most 32 OPEN (draft+scheduled+active) per org group. Org participation is the canned-pool selection (≤ 32; ABSENT = every org); logicalFacilityIds (≤ 32) RESTRICTS within the selected orgs' facilities (ABSENT = all of them). NOT searchable (the document non-joiner stance — this born-paginated list is the discovery read); NO UNIQ marker.
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 group-scoped human-facing system id (MD-…). |
type | String String! | The kind of record — always MarkdownPlan here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The FSM state: draft | scheduled | active | completed | cancelled. |
parentId | ID ID! | The parent org group; for a MarkdownPlan parentId === rootId. |
rootId | ID ID! | The org-group family root. |
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 OCC revision token — supply it on every mutation of this record; rotates on every write. |
refCaptions | RefCaption [RefCaption!]! | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
productScope | PromotionProductScope PromotionProductScope! | WHAT the cadence re-prices. REQUIRED with ≥1 member — an absent markdown scope would read 'reprice the whole catalog' (the anti-sitewide divergence from promotions). |
organizationIds | ID [ID!] | The canned-pool org selection — ABSENT = every org in the group participates. |
logicalFacilityIds | ID [ID!] | The explicit LF restriction — ABSENT = all LFs of the selected orgs. |
currency | String String! | The plan currency — every scoped II's schedule currency must EQUAL it at schedule time, and every money-bearing move carries it. |
steps | MarkdownStep [MarkdownStep!]! | The ordered cadence (1–8 steps): startAt strictly increasing, ALL future at schedule time; intermediate windows CHAIN to the next step's startAt; the LAST window ends at its explicit endAt (the lapse arm) or the standing 9999-12-31T00:00:00.000Z. |
nextDueAt | String | SYSTEM-maintained: schedule stamps steps[0].startAt; the activate firing re-stamps steps[last].startAt; terminal statuses disarm the lane. |
resolvedInventoryItemIds | ID [ID!] | SYSTEM-stamped at schedule: the resolved fan-out targets — the cancel doom-walk's bounded custody. |