Skip to main content

inventoryAnalytics

Requires permission analytics:organization:read.

Inventory analytics for the whole organization or one warehouse: total products and value, low-stock, out-of-stock and excess-stock counts, stock by category, top-moving products, turnover and warehouse utilization. Org-wide stock valuation: needs the organization analytics read permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query InventoryAnalytics {
inventoryAnalytics {
excessStockItems
inventoryTurnover
lowStockItems
outOfStockItems
totalProducts
totalValue
lowStockProducts {
productName
variantName
currentStock
minStockLevel
productId
quantity
}
}
}

Response:

{
"data": {
"inventoryAnalytics": {
"excessStockItems": 0,
"inventoryTurnover": 0,
"lowStockItems": 0,
"outOfStockItems": 0,
"totalProducts": 0,
"totalValue": 0,
"lowStockProducts": [
{
"productName": "string",
"variantName": "string",
"currentStock": 0,
"minStockLevel": 0,
"productId": "string",
"quantity": 0
}
]
}
}
}
inventoryAnalytics(
warehouseId: String
): InventoryAnalytics!

Arguments​

inventoryAnalytics.warehouseId ● String scalar​

Only this warehouse. Omit for all warehouses.

Type​

InventoryAnalytics object​

Stock figures.