# 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

| Field | Type | Notes |
| --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
| `sysId` | [String](/types/#scalars) `String!` | The group-scoped human-facing system id (IV-…). |
| `type` | [String](/types/#scalars) `String!` | The kind of record — always `InventoryItem` here. |
| `caption` | [String](/types/#scalars) `String!` | The record’s display name — what people see it called. |
| `status` | [String](/types/#scalars) `String!` | The FSM state: active \| inactive \| doomed. |
| `parentId` | [ID](/types/#scalars) `ID!` | The parent Variant; for an InventoryItem parentId!== rootId. |
| `rootId` | [ID](/types/#scalars) `ID!` | The org-group family root. |
| `createdAt` | [String](/types/#scalars) `String!` | When the record was created, as a UTC timestamp. |
| `updatedAt` | [String](/types/#scalars) `String!` | When the record last changed, as a UTC timestamp. |
| `revisionNum` | [Int](/types/#scalars) `Int!` | How many times this record has been edited; the first save is 0. |
| `revision` | [ID](/types/#scalars) `ID!` | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
| `refCaptions` | [RefCaption](/types/RefCaption/) `[RefCaption!]!` | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
| `logicalFacilityId` | [ID](/types/#scalars) `ID!` | The LogicalFacility leg of the junction — set at creation, IMMUTABLE thereafter. |
| `styleType` | [String](/types/#scalars) `String!` | The BIRTH-STAMPED spine styleType: simple \| service \| kit \| bundle; service/bundle IIs are stockless price-carriers. |
| `controlClass` | [String](/types/#scalars) `String!` | The control class (canned: non-controlled \| lot-controlled \| serially-controlled — server-validated, the DC-d shape). Mutable — an ordinary edit. |
| `onHandQty` | [String](/types/#scalars) `String!` | The CACHED on_hand balance — a SIGNED decimal string; moves ONLY via movements. |
| `reservedQty` | [String](/types/#scalars) `String!` | The CACHED reserved claim overlay. |
| `inTransitQty` | [String](/types/#scalars) `String!` | The CACHED in_transit balance (the transfer saga — zero until that slice). |
| `damagedQty` | [String](/types/#scalars) `String!` | The CACHED damaged balance. |
| `heldQty` | [String](/types/#scalars) `String!` | The CACHED held balance (reason-coded via the movement entries). |
| `onOrderQty` | [String](/types/#scalars) `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](/types/#scalars) `String!` | DERIVED, never stored: on_hand − reserved, computed at read time (exact decimal-string arithmetic). |
| `wmaCost` | [MoneyEntry](/types/MoneyEntry/) | The weighted-moving-average unit cost. Absent until the first costed receive. |

## Used by

- [createInventoryItem](/reference/inventory-item/createInventoryItem/)
- [deactivateInventoryItem](/reference/inventory-item/deactivateInventoryItem/)
- [doomInventoryItem](/reference/inventory-item/doomInventoryItem/)
- [inventoryItem](/reference/inventory-item/inventoryItem/)
- [inventoryItems](/reference/inventory-item/inventoryItems/)
- [reactivateInventoryItem](/reference/inventory-item/reactivateInventoryItem/)
- [updateInventoryItem](/reference/inventory-item/updateInventoryItem/)
