Skip to main content

InventoryItem

Represents an inventory item that tracks stock quantities and locations for a specific product within a brand's warehouses.

Inventory Calculations

The inventory system uses a hierarchical structure where:

  • **Physical** = Total units present in the building
  • **Available** = Physical - Reserved (units available for sale)
  • **Stock** = Physical - Unavailable (usable inventory)
  • **Allocated** = Units assigned to specific orders

Warehouse Filtering

Most quantity fields accept an optional warehouse_id argument to get inventory levels for a specific warehouse. When omitted, returns totals across all active warehouses.

Depth Status

The depth field indicates stock availability:

  • FULL_STOCK: Available inventory exceeds ordered quantities
  • OUT_OF_STOCK: No available inventory
  • OVERSOLD: Ordered quantities exceed available inventory

Incoming Items

The incoming_items field shows Shipment items that haven't been closed yet, ordered by expected arrival date (earliest first).

type InventoryItem {
allocated(
buildingIds: [ID!]
locationIds: [ID!]
warehouseId: ID
): Int!
archivedAt: ISO8601DateTime
available(
buildingIds: [ID!]
warehouseId: ID
): Int!
availableToMake(
buildingIds: [ID!]
): Int!
brand: Brand!
brandId: ID!
createdAt: ISO8601DateTime!
deletedAt: ISO8601DateTime @deprecated
depth: DepthEnum!
id: ID!
incomingItems: [InventoryIncoming!]
inventoryLocations(
filters: InventoryLocationFilterInput
): [ItemLocation!]
ordered(
buildingIds: [ID!]
warehouseId: ID
): Int!
physical(
buildingIds: [ID!]
locationIds: [ID!]
warehouseId: ID
): Int!
product: Product!
productId: ID!
stock(
buildingIds: [ID!]
warehouseId: ID
): Int!
unallocated(
buildingIds: [ID!]
warehouseId: ID
): Int!
unavailable(
buildingIds: [ID!]
warehouseId: ID
): Int!
updatedAt: ISO8601DateTime!
warehouses: [InventoryWarehouse!]
}

Fields

InventoryItem.allocated ● Int! non-null scalar

The allocated quantity of the inventory item.

InventoryItem.allocated.buildingIds ● [ID!] list scalar
InventoryItem.allocated.locationIds ● [ID!] list scalar

When set, returns sum of allocated at these warehouse locations.

InventoryItem.allocated.warehouseId ● ID scalar

InventoryItem.archivedAt ● ISO8601DateTime scalar

The "Archived At" field denotes the date and time that the inventory item was archived. If the inventory item has not been archived, this field will be null.

InventoryItem.available ● Int! non-null scalar

The available quantity of the inventory item. Defined as the total quantity of an SKU that is available for sale. Available Inventory = Physical Inventory - Reserved

InventoryItem.available.buildingIds ● [ID!] list scalar
InventoryItem.available.warehouseId ● ID scalar

InventoryItem.availableToMake ● Int! non-null scalar

The available-to-make quantity for bundle products. Calculated as MIN(floor(component_available / qty_needed)) across all components. This value is additive to the regular available quantity.

InventoryItem.availableToMake.buildingIds ● [ID!] list scalar

InventoryItem.brand ● Brand! non-null object

The brand that the inventory item is for.

InventoryItem.brandId ● ID! non-null scalar

InventoryItem.createdAt ● ISO8601DateTime! non-null scalar

When this inventory item was created.

InventoryItem.deletedAt ● ISO8601DateTime deprecated scalar

DEPRECATED

Use archived_at instead. This field will be removed in the future.

When this inventory item was deleted.

InventoryItem.depth ● DepthEnum! non-null enum

The depth of the inventory item.

InventoryItem.id ● ID! non-null scalar

The ID of the inventory item.

InventoryItem.incomingItems ● [InventoryIncoming!] list object

The incoming inventory items. These items represents Shipment items that have not been closed.

InventoryItem.inventoryLocations ● [ItemLocation!] list object

The locations that the inventory item is stored in.

InventoryItem.inventoryLocations.filters ● InventoryLocationFilterInput input

InventoryItem.ordered ● Int! non-null scalar

The ordered quantity of the inventory item. Defined as the total quantity of an SKU that has been ordered by customers.

InventoryItem.ordered.buildingIds ● [ID!] list scalar
InventoryItem.ordered.warehouseId ● ID scalar

InventoryItem.physical ● Int! non-null scalar

The physical quantity of the inventory item. Defined as the total quantity of an SKU present in the building. Physical Inventory = Unavailable + In Stock

InventoryItem.physical.buildingIds ● [ID!] list scalar
InventoryItem.physical.locationIds ● [ID!] list scalar

When set, returns sum of stock_level at these warehouse locations (from inventory_locations).

InventoryItem.physical.warehouseId ● ID scalar

InventoryItem.product ● Product! non-null object

The product that the inventory item is for.

InventoryItem.productId ● ID! non-null scalar

InventoryItem.stock ● Int! non-null scalar

The stock quantity of the inventory item. Defined as Physical Inventory - Unavailable. In Stock is also separated into Allocated + Unallocated

InventoryItem.stock.buildingIds ● [ID!] list scalar
InventoryItem.stock.warehouseId ● ID scalar

InventoryItem.unallocated ● Int! non-null scalar

The unallocated quantity of the inventory item. Defined as In Stock Inventory - Allocated.

InventoryItem.unallocated.buildingIds ● [ID!] list scalar
InventoryItem.unallocated.warehouseId ● ID scalar

InventoryItem.unavailable ● Int! non-null scalar

The unavailable quantity of the inventory item. Unavailable is the sum of Quarantine + Damaged units.

InventoryItem.unavailable.buildingIds ● [ID!] list scalar
InventoryItem.unavailable.warehouseId ● ID scalar

InventoryItem.updatedAt ● ISO8601DateTime! non-null scalar

When this inventory item was last updated.

InventoryItem.warehouses ● [InventoryWarehouse!] list object

The inventory values for each warehouse.

Returned By

initializeInventory mutation ● inventoryItem query ● inventoryQuickAdjust mutation

Member Of

ASNItem object ● InventoryItemConnection object ● InventoryItemEdge object ● ItemAllocation object ● ItemLocation object ● OrderItem object ● Product object ● SupplyOrderItem object ● TransferItem object

Implemented By

Notable union