Skip to main content

Stock Tracking

Tracking Stock in VapeEcommerce​

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

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

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