AlmondTill/G3N API

InventoryItem

object type

An inventory item: ONE per (Variant x LogicalFacility), carrying the CACHED bucket balances + the weighted-moving-average cost. Parent = the Variant; the other junction leg is the IMMUTABLE logicalFacilityId. The junction (variant x LF) is unique (a live duplicate is CONFLICT/IDENTITY_TAKEN naming the holder). styleType is BIRTH-STAMPED from the spine (immutable upstream): simple/kit IIs are STOCKED; service/bundle IIs are STOCKLESS price-carriers refusing quantity movements. Buckets are SIGNED decimal strings moved ONLY by the movement ops (receiveStock/adjustStock/reclassStock: one movement = ONE transaction; overcommit is allowed + ALWAYS evented, IV-i); available = on_hand − reserved, ALWAYS derived, never stored. Doom requires EVERY bucket exactly zero (CONFLICT/REFERENCED naming the non-zero buckets); deactivate is FREE and reversible. onOrderQty is a SIXTH field, NOT a bucket: the open quantity of the issued purchase orders for this junction, maintained by the purchase-order walks + the receipt post — never by movements, never inside available; a pre-walk row reads 0; the audit/repair pair (inventoryOnOrderAudit / repairInventoryOnOrder) stamps the derived truth over drift.

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 group-scoped human-facing system id (IV-…).
typeString String!The kind of record — always InventoryItem here.
captionString String!The record’s display name — what people see it called.
statusString String!The FSM state: active | inactive | doomed.
parentIdID ID!The parent Variant; for an InventoryItem parentId!== rootId.
rootIdID ID!The org-group family root.
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 OCC revision token — supply it on every mutation of this record; rotates on every write.
refCaptionsRefCaption [RefCaption!]!The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption.
logicalFacilityIdID ID!The LogicalFacility leg of the junction — set at creation, IMMUTABLE thereafter.
styleTypeString String!The BIRTH-STAMPED spine styleType: simple | service | kit | bundle; service/bundle IIs are stockless price-carriers.
controlClassString String!The control class (canned: non-controlled | lot-controlled | serially-controlled — server-validated, the DC-d shape). Mutable — an ordinary edit.
onHandQtyString String!The CACHED on_hand balance — a SIGNED decimal string; moves ONLY via movements.
reservedQtyString String!The CACHED reserved claim overlay.
inTransitQtyString String!The CACHED in_transit balance (the transfer saga — zero until that slice).
damagedQtyString String!The CACHED damaged balance.
heldQtyString String!The CACHED held balance (reason-coded via the movement entries).
onOrderQtyString String!On order — the issued purchase orders’ open quantity for this item: maintained by the purchase-order walks (+ at issue/approve, − at cancel, − the open remainder at close_short) and the receipt post (− the arriving quantity); NOT part of available; every decrement clamps at 0. A pre-walk row reads 0; the audit/repair pair (inventoryOnOrderAudit / repairInventoryOnOrder) stamps the derived truth over any drift.
availableQtyString String!DERIVED, never stored: on_hand − reserved, computed at read time (exact decimal-string arithmetic).
wmaCostMoneyEntryThe weighted-moving-average unit cost. Absent until the first costed receive.

Used by