Author:
Kirill Gaiduk
Changed on:
27 Mar 2026
`condition`, `expiresOn`, `countryOfOrigin`, `channel`, `manufacturer`, `manufacturerBatchNumber`, `supplier`, and `segment1/2/3``associationType` and `associationRef`, particularly for reservation linkage and traceability
`LAST_ON_HAND` Inventory Quantity
| Entity | Description |
`InventoryPosition`1 | Inventory Position is the core aggregate entity representing the complete inventory state for a specific product (SKU) at a specific inventory node: a warehouse, store, fulfillment centre, or drop-ship supplier. It is the primary unit of inventory tracking in the platform. A single Inventory Position consolidates all the granular stock information for that product-location combination into one addressable record. |
`InventoryQuantity`2 | Represents a portion of physical inventory within an Inventory Position. In Stock Segmentation, Inventory Quantities may include segmentation attributes (for example `condition`, `supplier`, `countryOfOrigin`, `manufacturer`, `manufacturerBatchNumber`, `expiresOn`, `segment1/2/3`) that logically partition stock without creating multiple physical positions. |
`VirtualPosition`3 | Represents baseline Available-to-Sell inventory for a product at a location. Availability is derived from the underlying segmented Inventory Quantities and reflects the aggregation logic applied across those quantities. |
`VirtualSegment`4 | Represents customer-facing availability scoped to a single segmentation dimension (`type` and `value`). Virtual Segments allow segmented availability to be exposed without duplicating the physical inventory model. |
| Relationship | Type | Description |
| Position to Quantities | One `InventoryPosition` to many `InventoryQuantity` | A single Inventory Position holds all Inventory Quantities for a product at a location, including segmented quantities. This preserves a single physical anchor while allowing multiple logical partitions of the same stock to coexist and be aggregated consistently. |
| Quantity to Quantities | One `InventoryQuantity` to many `InventoryQuantity` | Inventory Quantities support explicit parent–child relationships via the `parent` reference. This allows derived lifecycle states (such as reservations or other operational states) to be anchored to a specific segmented quantity, ensuring availability is reduced at the correct segmentation scope. |
| Quantities to Associated Entity | Many `InventoryQuantity` to one associated entity | Inventory Quantities can be linked to operational records using `associationType` and `associationRef`. In Stock Segmentation, this is primarily used to tie reservations or other lifecycle records to a specific segmented quantity for traceability and accurate availability calculations. |
| Virtual Position to Segments | One `VirtualPosition` to many `VirtualSegment` | A single Virtual Position represents baseline availability. Virtual Segments expose availability scoped to a single segmentation dimension (`type` and `value`), enabling channel, market, or customer-facing views without altering the physical inventory structure. |
| Operation | Description | Common Stock Segmentation Inputs | Returns | Comment |
`createInventoryQuantity` | Creates an Inventory Quantity record representing a segmented portion of physical inventory or a derived lifecycle record |
| `InventoryQuantity` | Use to create segmented quantities and derived quantities anchored to a specific segment |
`updateInventoryQuantity` | Updates an existing Inventory Quantity as inventory progresses through its lifecycle |
| `InventoryQuantity` | Use to maintain segmentation data and derived records over time |
`updateInventoryQuantityChildren` |
|
| List of updated `InventoryQuantity` |
|
`createVirtualPosition` | Creates a Virtual Position and its Virtual Segments used for customer-facing segmented availability |
| `VirtualPosition` (with segments) | Preferred way to create segmented availability projections |
`updateVirtualPosition` | Updates a Virtual Position and its availability segments |
| `VirtualPosition` (updated segments) | Use to maintain segmented availability projections as they change |
| Operation | Description | Common Stock Segmentation Filters | Returns | Comment |
`inventoryPosition.quantitiesAggregate` | Aggregates Inventory Quantities under a specific Inventory Position based on lifecycle and segmentation filters |
| Aggregate totals (quantity summary) | Primary pattern for position-scoped segment totals |
`inventoryQuantity.quantities` | Retrieves the direct child quantities for a given parent Inventory Quantity |
| List of child `InventoryQuantity` | Returns one hierarchy level (direct children only). Useful for tracing derived states |
`inventoryQuantity.quantitiesAggregate` | Aggregates the direct child quantities for a given parent Inventory Quantity |
| Aggregate totals (child summary) | Use to summarize derived quantities anchored under a specific segmented quantity (for example reservations) |
`inventoryQuantities` | Searches inventory quantities at a catalog level using filter criteria |
| List of `InventoryQuantity` | Useful for reporting or reconciliation patterns not constrained to a single position |
`inventoryQuantityAggregate` | Aggregates inventory quantities at a position level |
| Aggregate totals | Use when totals are needed without retrieving records |
`virtualPosition` | Retrieves virtual availability, including segmented availability evaluation |
| `VirtualPosition` (+ selected segment availability) | Returns either baseline Virtual Position quantity or a matching Virtual Segment quantity depending on inputs |
`virtualPositions` | Retrieves virtual availability across multiple positions |
| List of `VirtualPosition` | Use in sourcing and promising flows requiring multi-position evaluation |
`virtualPosition.segments` | Retrieves the Virtual Segment records attached to a specific Virtual Position |
| `VirtualSegmentConnection` | Use when underlying segment records are needed instead of only the resolved quantity returned by `virtualPosition` |

`LAST_ON_HAND` Inventory Quantities are reduced by reservations already committed against them: VP001 = (100 - 3 - 5) + (20 - 5) + 20 = 127`createInventoryQuantity` mutation. Reservations are anchored using:`parent``associationType``associationRef``channel``virtualPosition` / `virtualPositions` queries. Segmented date-based availability is retrieved using the following parameters:`segment``type``value``availableOn`