Inventory Management feature overview
Edit on GitHubThr Inventory Management feature refers to warehousing and managing your store’s stock. In this context, a warehouse is the 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 on 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. See Availability management for details on how to manage availability.
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. You can manage relations between stores and warehouses in the Back Office or by importing the warehouse and store data. See Managing warehouses for details on how you can manage warehouses and stores in the back office and File details: warehouse_store.csv on how you can import the warehouse and store data.
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. See File details: warehouse_address.csv for details about the import file.
Stock management
Stock defines the physical amount of products you have in your warehouse. Spryker Commerce OS allows you to define stocks for your products in different warehouses.
A product is associated with at least one stock product. It should be noted that only concrete products can have stocks. Additionally, in the Back Office, you can define a product to be never out of stock to make it available at any time.
When order is made, stock is not updated automatically in the system, you have to set it manually. You can define stock only for concrete products. You can set stock by:
- Editing product stock in the Back Office. See Editing stock for details.
- Importing the quantities of items stored in each of the warehouses. See Stocks for details.
How Spryker stores your product stock
Spryker holds your product stock in a type called DECIMAL(20,10), which means that your product stock can be 20 digits long and have a maximum of 10 digits after the comma. For example:
- 1234567890.0987654321
- 0.0987654321
- 1234567890098765432.1
- 12345.6789009876
- 1.0000000000
Calculating the current stock for products
A product quantity from stock is being reserved when an order containing it is being processed. The state machine is reserving stocks by setting the reserved flag. To calculate the available stock per store, not only the maintained stock (the sum of active stocks related to the current store from each storage location) is taken into account, but also the currently processed orders.
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:
See Checking availability for details on how you can check product availability in the Back Office.
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 payment fails and order is cancelled, the item is not reserved anymore:
State machine example
For SEO purposes, products that are not available can still be displayed on the Storefront with the inactive Add to cart button.
Related Business User articles
BACK OFFICE USER GUIDES |
---|
Create a warehouses |
Manage warehouses |
Manage product availabilities |
Are you a developer? See Inventory Management feature walkthrough for developers.
Thank you!
For submitting the form