AlmondTill/G3N API

On this page

markdownPlan

query · in the family Markdown plan

What it does

Look up one record — a markdown plan — scheduled price cuts over time.

A MarkdownPlan by id, within the caller's OWN org-group family; requires authentication. A cross-tenant id reads as null (not-found) AND trips the rootId tripwire server-side.

What happens

Reads only — changes nothing.

Who may call it

Capability area: Reading your records — Looking up and listing the records of your organization.

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.

Returns

MarkdownPlan — 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.

Example request

query ExampleMarkdownPlan($id: ID!) {
  markdownPlan(id: $id) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    organizationIds
    logicalFacilityIds
    currency
    nextDueAt
    resolvedInventoryItemIds
  }
}

Variables:

{
  "id": "01900000-0000-7000-8000-37386ae00000"
}

Example response

{
  "data": {
    "markdownPlan": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "MD-EXMP-0000-000F",
      "type": "MarkdownPlan",
      "caption": "Blue jeans",
      "status": "draft",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "organizationIds": [
        "01900000-0000-7000-8000-60e064dc0000"
      ],
      "logicalFacilityIds": [
        "01900000-0000-7000-8000-2c5783bd0000"
      ],
      "currency": "USD",
      "nextDueAt": "2027-01-31T00:00:00.000Z",
      "resolvedInventoryItemIds": [
        "01900000-0000-7000-8000-0600d5020000"
      ]
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer