The latest version of Magento (available as of Q3 2018) will contain a very valuable extension: Magento MSI, or multi source inventory.
Already available for download via Github
With Magento MSI it's possible to link multiple inventory sources to one or multiple websites. The amount in which a product is available, is calculated based on the sources made available for that website. Grouping multiple sources and defining the relation between sources and webshops is done with a new concept: 'stocks'.
Salable quantity - the total sum of the stocks - mutates immediately when a sale is processed. But, deducting the source of a product is postponed until a shipment is created. This is done via 'source selection algorithms', which have to be writen in code (for the time being), but possibly will be configurable in the feature.
But MSI is a very big step for Magento.
Note: Magento MSI still in development. We are looking for the right terms for the concepts within the system. They can be different in the final release of Magento MSI.
Until now, multi inventory was only possible with the use of third party modules. Because there was no support in the core, available solutions were very complex. And there was big challange in making the available solutions compatible with core modules and other third party modules.
The reason for this complexity?
Stock (qty) was always global. It was not possible to overwrite this value on a deeper level.
Locale (language fronted)
Root category configuration
The new Magento MSI is completely decoupled from layered configuration illustrated above. Relations between websites and stocks can be created in any way desirable and are unaffected by the way a Magento shop is configured.
Because 'stock' is now separated from 'salable quantity' (more about that later), a configuration with backorders or pre-orders can also be implemented.
Magento multi source inventory is interesting for the following (imaginary) situations:
New in Magento Multi Source Inventory are sources. A source represents a place where stock is physically located. You create a source for each location where products can (or can) be physically on a shelf. Examples of sources are a store, the central warehouse and the warehouse of the fulfillment partner.
For each source that is created, a number can be entered for a product.
In our example we register 4 sources. Warehouse (Warehouse) LA, Warehouse DE, Store NL (stock in the store) and the Warehouse in NY.
The amount of information required for creating a resource is limited. Actually, only name and code are relevant at this point.
Another new concept is 'stocks'. A stock groups multiple sources and is linked to a channel. A channel is a new term; you choose a website here.
A stock serves as a virtual, aggregated representation for the sources of a sales channel.
A bit cryptic, but remember this.
In our example, we create a stock which consists of the sources Store NL and Warehouse DE.
Sources: Store NL, Warehouse DE
A stock is linked to a website. This means that all sales via this website are deducted from one (or more) sources that are part of the stock.
The final source(s) from which the stock is deducted when creating a shipment is selected via the sourceselection algorithm. But more about that later.
This overview shows our current setup:
Sources: Store NL, Warehouse DE
Sources: Warehouse NY, Warehouse LA
The beauty of this construction is that expanding requires little effort. If we want to open an extra warehouse in France (or choose a fulfillment partner), we only have to create a source and link it to the Europe stock. And possibile to the US stock, if we want to enable shipping to the US from france.
Now that sources and stocks have been created, it is interesting to look at the product edit page in the Magento admin panel.
Per source created, it's possible to fill in the number available for this product. In our case, that is stock for the sources Store NL, Warehouse DE, Warehouse LA and Warehouse NY.
Summary so far: for each product, you register the number of items per source. Several sources combined form a stock. A stock is linked to a website.
In the product grid we can see two new columns: Quantity per Source and Salable Quantity
With MSI, an important shift has been made regarding the way stock is handled in general
Quantity per source represents (as visible in the column) the physical stock at a location. We do not want to change this figure until a shipment has been created. Not when an order is placed, which is the case in previous versions of Magento.
New is 'Salable Quantity'. Salable Quantity is the sum of available resources, grouped in stocks. Because of the relationship between stocks and channels (websites), we cansee all stocks in the adminpanel, but the salable quantity per website is different.
In our case:
Europe = 2 (Store NL: 2 + Warehouse DE: 0)
There are only 2 products salable via websites linked to the 'Europe' stock
US = 18 (Warehouse LA: 12 + Warehouse NY: 6)
There are 18 products salable via websites linked to the 'United States' stock
A visitor using a webshop linked to the EU stock, can only order 2 pieces of the product. But, visitors in the US can order 18 pieces of the product.
If an order is placed, the ordered quantity is deducted from the salable number.
Just like 'qty' did before, the value 'salable quantity' triggers a number of notifications and actions (depending on configuration):
Salable quantity is mutated when an order is placed and paid.
It really gets interesting when we create a shipment. It is only at this moment that it is calculated from which source stock is actually deducted.
This is done via a newly introduced concept: Source selection algorithms.
Source selection algorithms can be used to calculate from which source(s) an order can be delivered in the most efficient (or prefered) way, using all interesting information from customers, products, addresses, stock and sources.
That source selection happens when making shipments, instead of when placing an order, is no coincidence.
Source selections algorithms can be very complex and therefore require computing power and time to exectue. Especially if they are performed as part of a mass action.
Performance has been an important focal point during the development of the Magento MSI module. By selecting the actuel source later, the Magento checkout remains blazing fast.
Magento multi inventory does support partial shipments. When creating a shipment, it is possible to choose for how many ordered items a shipment is created.
This way, there is some room for tweaking the way an order is shipped manually.
For example in a situation where a customer indicates that he / she wants to have a specific product delivered upfront after placing an large order. A customer service representative can make a partial shipment to deliver the products available from store stock, as where the source selection algorithm would haved delivered from the central warehouse (with a longer delivery time).
At the launch of Magento MSI, one source selection algorithm will be available: Source priority.
In other words; The priority is set manually for the various sources (department stores, warehouse, external supplier).
Pro tip: When setting the sources of a stock, the order determines the priority.
A number of other preconditions can be found from reading the source code:
Source selection algorithms can be programmed according to your own wishes.
Some insight news: Amasty will have a set of source selection algorithms available at the launch of Magento MSI.
Multi source inventory is part of Magento 2.3, so will be available in your adminpanel after upgrading. During the upgrade, one source and one stock are created (the defaults).
If there is no interest in using Magento's multi source inventory features, there is no obligation to do so.
Please note: when using the MSI features (sources or stocks are created) at launch, there is no compatibility with grouped and bundled products. Support for these product types is a feature that is at the top of the roadmap for the follow-up release of Magento MSI.
We'd love to get in touch with you. Let's start a Magento webshop project?