Stock Tracking
Tracking Stock in Saleor
In Saleor, inventory management is handled at the product variant level.
Each variant can be individually configured to track stock using the
productVariant.trackInventory
field.
- If
trackInventory: true
, Saleor reduces and validates stock on checkouts or draft orders, and blocks sales when stock runs out. - If
trackInventory: false
, Saleor will not validate or reduce inventory - makes product variants always available in assigned warehouses.
To apply a default behavior across all variants, use the
trackInventoryByDefault
setting on the Shop object (true
by default).
The warehouse from which stock is reduced is determined by the Allocation Strategy.
Synchronizing Stock from External Sources
When synchronizing stock between Saleor and external sources, your approach depends on whether Saleor is the only sales channel.
If Saleor is the sole source of sales, you can either periodically sync stock levels from the external source to Saleor or send stock update mutations for each stock change (if the external source allows it). In this scenario, it's important to use the trackInventory
field to track stock changes within Saleor.
If Saleor is not the only sales channel, your approach depends on whether the external source supports real-time stock updates. If it does, you may disable stock tracking in Saleor and use webhooks to keep Saleor's stock updated. If real-time updates are not supported, you can periodically synchronize stock levels while keeping trackInventory
enabled in Saleor to prevent overselling.