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; 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
| 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 IV-… — stable for the record’s life. |
type | String String! | The kind of record — always InventoryItem here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The record’s current state — one of active, inactive or doomed. |
parentId | ID ID! | The parent Variant; for an InventoryItem parentId!== rootId. |
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. |
logicalFacilityId | ID ID! | The LogicalFacility leg of the junction — set at creation, immutable thereafter. |
styleType | String String! | The birth-stamped spine styleType: simple | service | kit | bundle; service/bundle IIs are stockless price-carriers. |
controlClass | String String! | The control class (canned: non-controlled | lot-controlled | serially-controlled — server-validated, the DC-d shape). Mutable — an ordinary edit. |
onHandQty | String String! | The cached on_hand balance — a signed decimal string; moves only via movements. |
reservedQty | String String! | The cached reserved claim overlay. |
inTransitQty | String String! | The cached in_transit balance (the transfer saga — zero until that slice). |
damagedQty | String String! | The cached damaged balance. |
heldQty | String String! | The cached held balance (reason-coded via the movement entries). |
onOrderQty | String 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. |
availableQty | String String! | Derived, never stored: on_hand − reserved, computed at read time (exact decimal-string arithmetic). |
wmaCost | MoneyEntry | The weighted-moving-average unit cost. Absent until the first costed receive. |