Skip to main content

Stock Tracking

Tracking Stock in BoxNCase

In BoxNCase, 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, BoxNCase reduces and validates stock on checkouts or draft orders, and blocks sales when stock runs out.
  • If trackInventory: false, BoxNCase 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 BoxNCase and external sources, your approach depends on whether BoxNCase is the only sales channel.

If BoxNCase is the sole source of sales, you can either periodically sync stock levels from the external source to BoxNCase 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 BoxNCase.

If BoxNCase 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 BoxNCase and use webhooks to keep BoxNCase's stock updated. If real-time updates are not supported, you can periodically synchronize stock levels while keeping trackInventory enabled in BoxNCase to prevent overselling.