Skip to main content

Reorder configuration

Use reorder configuration when a merchant integration maintains the reorder points of products in another system, such as a planning tool, or needs to find the stock that has reached its reorder point.

A reorder point is the stock level at or below which a product should be reordered. The maximum quantity (targetMaximumQuantity) is the stock level to replenish up to. Both can be set on three levels.

Available operations​

Levels​

LevelCompared withStored on
ProductThe product's stock in all warehouses together (physicalStock on the product)The product
WarehouseThe product's stock in one warehouse (WarehouseStock)One ProductWarehouseConfiguration per product and warehouse
Bin locationThe product's stock on one bin location, or on the unknown bin location of a warehouseOne ProductStockLocationConfiguration per product and stock location

The levels are independent of each other. Each mutation writes its own level only, no level falls back to another one when it has no value, and the values of the warehouses and bin locations do not add up to the value of the product. Pickware's demand planning works with the product level only.

On the warehouse and the bin-location level, stockBelowReorderPoint holds the reorder point minus the current stock and is kept up to date as the stock changes. It is 0 or greater when the stock is at or below the reorder point, and negative when it is above. It is null while Pickware has no stock record of the product in that warehouse or at that location.

Writing reorder points​

All three mutations take a reorderPoint and an optional targetMaximumQuantity, and each call writes both. Omitting targetMaximumQuantity or passing null clears the maximum quantity, so always send the current value when you only want to change the reorder point. Both values must be 0 or greater, otherwise the mutation fails with BAD_REQUEST.

  • setProductReorderConfiguration returns the product. It fails with NOT_FOUND when the product does not exist.
  • setProductWarehouseReorderConfiguration updates the configuration of the product and warehouse, or creates it when there is none, and returns it.
  • setProductStockLocationReorderConfiguration takes a binLocationId for a bin location, or no binLocationId for the unknown bin location of the warehouse given in warehouseId. It updates or creates the configuration, also for a location that holds no stock of the product yet, and returns it. A bin location that does not exist fails with NOT_FOUND, and one that is not in the given warehouse with BAD_REQUEST.

Reading reorder points​

A ProductWarehouseConfiguration names its product and warehouse, so filter productWarehouseConfigurations by productId, warehouseId or stockBelowReorderPoint. The same row holds the product's default bin location in the warehouse. A row created only to set the default bin location has a reorder point of 0.

A ProductStockLocationConfiguration carries only its values, not the product or the location it belongs to. Read the configurations of one product through stockLocationConfigurations on the product, and keep the id that setProductStockLocationReorderConfiguration returns together with the location you set it for when you need to know which row belongs to which location.

Example: set the reorder point in a warehouse​

mutation SetProductWarehouseReorderConfiguration($input: SetProductWarehouseReorderConfigurationInput!) {
setProductWarehouseReorderConfiguration(input: $input) {
id
reorderPoint
targetMaximumQuantity
stockBelowReorderPoint
}
}
{
"input": {
"productId": "UHJvZHVjdDow...",
"warehouseId": "V2FyZWhvdXNlOjAx...",
"reorderPoint": 20,
"targetMaximumQuantity": 120
}
}

Example: list the products to reorder in a warehouse​

query ProductsToReorder($warehouseId: ID!, $cursor: String) {
productWarehouseConfigurations(
first: 100
after: $cursor
filter: { warehouseId: { equals: $warehouseId }, stockBelowReorderPoint: { gte: 0 } }
) {
edges {
node {
reorderPoint
targetMaximumQuantity
stockBelowReorderPoint
product {
id
productNumber
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
{
"warehouseId": "V2FyZWhvdXNlOjAx..."
}

A configuration with a reorder point of 0, such as one that only holds a default bin location, also matches when the warehouse has no stock of the product left. Add reorderPoint: { gt: 0 } to the filter to leave such configurations out.

The current stock in the warehouse is reorderPoint minus stockBelowReorderPoint, so targetMaximumQuantity minus that stock is the quantity that replenishes the warehouse up to its maximum. Neither value counts stock that is still on open supplier orders. To order the quantity, raise a supplier order.