PurchasePack
object type
A purchase pack — a purchasing/handling packaging definition ON a variant (case of 24, pallet of 480): NOT a UoM conversion (the inventory ledger is ALWAYS in the variant stock UoM — reaffirmed); a pack is packaging metadata + a line-ENTRY breakdown step (PO/Receipt lines entered in packs resolve to stock units at entry: packQuantity x unitsPerPack). Parent = the VARIANT (0..N packs per variant). unitsPerPack is IMMUTABLE at birth, which keeps every stored document line reconstructible forever. The code is a dup-gated LABEL (trim+case-fold vs LIVE siblings on the same variant, naming the holder — lean 1: no UNIQ marker). Live packs block the parent Variant doom (the children law); live OrgVendorItems naming a pack block ITS doom; deactivate stays FREE everywhere (an inactive pack refuses NEW line entry while its unitsPerPack keeps denominating stored terms).
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 group-scoped human-facing system id (PK-…). |
type | String String! | The kind of record — always PurchasePack here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The FSM state: active | inactive | doomed. |
parentId | ID ID! | The parent Variant; for a PurchasePack parentId!== rootId. |
rootId | ID ID! | The org-group family root. |
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 OCC revision token — supply it on every mutation of this record; rotates on every write. |
refCaptions | RefCaption [RefCaption!]! | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
code | String String! | The pack label (at most 64 chars) — dup-gated among LIVE siblings on the same variant; editable (re-gated). |
unitsPerPack | String String! | Stock units per pack in the variant stock UoM (strictly positive decimal, 4 dp — covers weight-UoM variants). IMMUTABLE at birth. |
packGtin | String | Optional pack GTIN — GTIN-14/ITF-14 validated (14 digits + check digit, helpers; a PLAIN field — the org-scoped identifier LEDGER stays variant-only, lean 3); optional + editable. |
nominalWeightKg | String | Optional nominal pack weight in KILOGRAMS (fixed unit — lean 4); optional + editable. |
lengthCm | String | Optional outer length in CENTIMETERS (the dims trio — all three or none, lean 4); optional + editable. |
widthCm | String | Optional outer width in CENTIMETERS (the dims trio); optional + editable. |
heightCm | String | Optional outer height in CENTIMETERS (the dims trio); optional + editable. |