Order
object type
The fields of Order.
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 SO-… — stable for the record’s life. |
type | String String! | The kind of record — always Order here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The record’s current state — one of open, held, placed, completed, voided, abandoned, cancelled, draft, sent, accepted, expired, accruing, paid_in_full, defaulted, sourcing or ready. The orderType profile selects which of these states this record can reach. |
parentId | ID ID! | pos → the selling LogicalFacility; ecom → the Organization — fixed at birth by origin, never reparented; rootId = the org group either way. |
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. |
organizationId | ID ID! | The selling Organization — immutable at birth; active-gated at create. |
channel | OrderChannel OrderChannel! | The selling channel — immutable; decides the parent + the reserve arm. |
orderType | OrderType OrderType! | All four profiles buildable: sale + draft/quote + layaway + special_order. |
validUntil | String | The draft/quote validity window end — required on quote, optional on draft, absent elsewhere; accept past it refuses CONFLICT/EXPIRED (the at-USE gate); once set the scheduler strand fires the draft|sent → expired rows on schedule. |
termEndsAt | String | The layaway term end: the instant the scheduler fires placed|accruing → defaulted. Optional (absent ⇒ no scheduled default), layaway-only, future-dated, editable while live (a termEndsAt-ONLY edit stays legal at placed|accruing — the term is schedule, not content). |
convertedOrderId | ID | The conversion ref — the placed sale Order this draft/quote minted at accept; accepted-state only. |
sourceDocumentId | ID | The conversion back-ref — the draft/quote this sale was converted from (stamped at the mint birth); sale-profile only. |
reorderOfOrderId | ID | The reorder provenance ref — the sale-profile source Order this order was reordered from; sale-profile only. Distinct from sourceDocumentId: conversion consumes its doc, a reorder consumes nothing. |
logicalFacilityId | ID ID! | The selling/fulfilling LF — pricing capture + the ecom reserve ride its InventoryItems (per-line sourcing =). |
currency | String String! | The order currency — the org defaultCurrency snapshot, fixed at create. |
customer | OrderCustomer | Optional inline customer capture. |
shipTo | OrderShipTo | The document-level ship-to destination: stamped by the agent checkout when a complete shipping address arrives (the Fulfillment's shipTo at ship is the same shape); absent otherwise. |
fulfillmentOption | OrderFulfillmentOption | The selected fulfillment option snapshot + its fee: the channel's rate card or pickup choice as picked (words · fee in minor units · transit days · the pickup location); the fee is a separate quote line — the accept adds it to the sale. |
agentCheckout | OrderAgentCheckout | The agent checkout block: present ⟺ this Order is a UCP checkout session — the AgentChannel · the platform profile URL (absent on a staff test drive) · the platform's destination id · the buyer names as given · the captured consent decisions. |
exemptionCertificateId | ID | Optional ExemptionCertificate ref — at-USE validity gated at place. |
discounts | OrderDiscount [OrderDiscount!]! | Order-level pre-tax discounts — allocated to lines pro-rata by discounted subtotal, largest remainder (exact). |
paymentState | String String! | The payment rollup — stamped from net tendered vs total at every tender post. |
fulfillmentState | String String! | The fulfillment rollup — born unfulfilled; transitioned by the events. |
recognitionState | String String! | The recognition rollup — born deferred (deposits-until-delivery); conversion = the delivery events. |
taxJurisdictionId | ID | The origin jurisdiction captured at place; absent pre-place or when the PFL is unclassified (the disclosed nexus-none arm). |
subtotalMinor | Int Int! | Σ line bases in minor units. |
discountTotalMinor | Int Int! | Everything taken off pre-tax (line discounts + the order-level reduction), minor units. |
taxTotalMinor | Int Int! | Σ line tax in minor units — 0 until place; inside the captured prices under an inclusive (vat_gst) regime (disclosed, not double-counted). |
totalMinor | Int Int! | The order total in minor units — exclusive regimes add tax; inclusive regimes carry it inside the captured prices. |
fulfillmentFeeMinor | Int | The fulfillment fee folded into the money at commit: the agent checkout's selected option fee restated as a money rollup on the minted sale (totalMinor = Σ line totals + this + its tax); absent on drafts and on every non-agent sale. |
fulfillmentFeeTaxMinor | Int | The tax on the fulfillment fee (taxed as a standard good at the origin — the lean), inside taxTotalMinor; present ⟺ fulfillmentFeeMinor. |
tenderedNetMinor | Int | Σ signed applied minor over the order tenders; absent = no tender yet. balance due = totalMinor − this. |
tipTotalMinor | Int | Σ tips captured at tender; absent = none. |
paymentIds | ID [ID!] | The Payment attempts spawned by card tenders; absent = none. |
refundIds | ID [ID!] | The Refund attempts spawned by refundReturn(original_tender); absent = none. |
disputeIds | ID [ID!] | The Disputes webhook-born against this order’s payments; absent = none. |
invoiceIds | ID [ID!] | The Invoices issued from this order. The bounded order→invoice enumeration the settlement/recognition attribution reads; absent = none. |
couponIds | ID [ID!] | The Coupons attached to this order. A trigger coupon's promotion evaluates only while attached; place re-validates every member and refuses a non-applied one. Absent = none. |
loyalty | OrderLoyalty | The loyalty attach. Earn commits at place on the final post-ALL-step-2-reductions discounted taxable base; the redemption emits source=loyalty line entries at position 4. Sale-profile only; absent = none. |
employee | OrderEmployee | The employee-discount attach. The position-5 evaluation emits source=employee line entries (the last pre-tax reduction); every orderType may carry it (the coupon posture — a pure reduction mints nothing); the User re-validates fresh at place. Absent = none. |
sourcingSagaId | ID | The special_order_sourcing Saga stamped at launch; special_order-profile only. |
commissionAgentUserIds | ID [ID!] | The commission custody stamp: the distinct union of attributed agents + manager-on-all holders whose entries minted — the deterministic clawback walk-list (the resolvedInventoryItemIds custody class). |
affiliateId | ID | The affiliate custody stamp: the attributed Affiliate — the clawback walk key (entries ride affledger#<affiliateId>). |
lines | OrderLine [OrderLine!]! | The embedded lines (0..45 — an empty open cart is legal, place refuses it); lineNo frozen at placed. |