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 ASN (Advanced Shipping Notice) items that haven't been closed yet, ordered by expected arrival date (earliest first).

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

Fields

InventoryItem.allocated ● Int! non-null scalar

The allocated quantity of the inventory item.

InventoryItem.allocated.warehouseId ● ID scalar

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.warehouseId ● ID 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 scalar

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 ASN 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.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.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.warehouseId ● ID scalar

InventoryItem.unallocated ● Int! non-null scalar

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

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.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