Stock Tracking
Tracking Stock in Saleor
In Saleor, inventory management is handled at the product variant level. You can assign specific stock levels to each product variant and decide whether Saleor should track inventory for these variants. This is controlled by the productVariant.trackInventory
field. If you want to set a default behavior for all product variants, you can adjust the trackInventoryByDefault
(true
by default) field on the Shop object.
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.