Inventory Management feature overview

Edit on GitHub

The Inventory Management feature refers to warehousing and managing your store’s stock. In this context, a warehouse is a physical place where your products are stored, and stock is the number of products available in the warehouse. See Warehouse management and Stock management for details about how to manage them. Stock does not always reflect the real availability of products, as not all the items available in stock are available for sale. For example, if items are reserved, that is, there are pending orders with these items, they can not be ordered, even though physically, they are still in stock. The value that reflects the difference between the current quantity of products in stock and the quantity of these products in the pending orders, is referred to as the availability of products. The availability is calculated per store. For details about managing availability, see Availability management.

Warehouse management

You can create warehouses in the Back Office or import them.

A warehouse can be assigned to a single store or shared between several stores. For the warehouse and stock management scenarios you can set up for your project, see Manage stocks in a multi-store environment: Best practices. You can manage relations between stores and warehouses in the Back Office or by importing the warehouse and store data. For details about managing warehouses and stores in the back office, see Managing warehouses. For details about importing the warehouse and store data, see File details: warehouse_store.csv.

Defining a warehouse address

You can define the warehouse address that will be used as the shipping origin address by importing the warehouse address data. For details about the import file, see File details: warehouse_address.csv.

Avalara: Warehouse assignment to order items

By default, a warehouse is not linked to a sales order item. The logic described below applies only when Avalara is integrated into your project. That is, it is used to get warehouse addresses to calculate taxes in the USA.

During the checkout, once a buyer entered delivery addresses for all order items, be it a single delivery or a split delivery, the order items are assigned to warehouses to fulfill them.

By default, if a buyer orders several items of the same SKU, the requested item’s stock is checked in all the warehouses of the store. Based on the item stock, the warehouses are sorted in descending order—for example:

  1. Never out of stock
  2. 1000 items
  3. 999 items
  4. 2 items
  5. 0 items

If the requested quantity of the item is available in the first warehouse, that is, the one holding the biggest stock of the item, this warehouse is assigned to fulfill the order item.

The warehouse with the never out of stock item quantity is always assigned to the item.

If the first warehouse’s stock is insufficient to fulfill the order item, this warehouse and the next one are assigned to the order item to fulfill the remaining quantity.

Schematically, the process looks like this:


Stock management

When the order is made, the stock is not updated automatically in the system, and you have to set it manually. You can define stock only for concrete products. You can set stock by doing the following:

Availability management

In contrast to stock, availability considers not just the number of products in the warehouse but also current open orders.

When a buyer places an order, the products in the order become reserved, and the product availability changes. The changes are reflected in the Back Office: The availability is equal to the stock before the order is placed, and after the order is placed, the availability decreases, but the stock remains the same.

Product availability before the order:


Product availability after the order:


For details about checking product availability in the Back Office, see Check availability of products.

The availability of a product bundle is defined by the availability of each product in the bundle. If at least one of them is out of stock, the entire bundle is unavailable.

In the state machine, a developer can use the reserved parameter to define the states at which the order items are reserved. There can also be states that release an item. For example, when the payment fails and the order is canceled, the item is not reserved anymore:

State machine example


Unavailable products on the Storefront

For SEO purposes, products that are not available can still be displayed on the Storefront with the inactive Add to cart button.

Create warehouses
Edit warehouses
Check availability of products
Edit stock of products and product bundles
Install the Inventory Management feature Upgrade the Availability module Retrieve abstract product availability File details: product_stock.csv
Install the Inventory Management + Alternative Products feature Upgrade the AvailabilityCartConnector module Retrieve concrete product availability File details: warehouse_address.csv Manage stocks in a multi-store environment: Best practices
Install the Inventory Management Glue API Upgrade the AvailabilityGui module Retrieve availability when retrieving abstract products File details: warehouse_store.csv
Upgrade the AvailabilityOfferConnector module Retrieve availability when retrieving concrete products “Import file details: warehouse.csv”
Upgrade the AvailabilityStorage module