Magento 2.3.0 & higher version supports Multi Source Inventory (MSI)
Magento 2.3.0 provides high revolution, high flexibility, cost-effectiveness, and efficiency Inventory Management to allow the merchants to control inventory by using single or multiple sources and sales channels, It is called “Multi Source Inventory”
Magento 2.3.0 & higher version Multi Source Inventory[MSI] supports merchants to manage their inventory in more than one locations to accurately reflect their physical inventories.
Magento 2.3.0 & higher version MSI Configuration
There are two things [Magento 2 Admin]
[1] Multi Source Inventory Sources
MSI allows Admin to create sources for each product inventory location
There are following below steps need to follow
[1.1] Go to Admin -> Stores -> Inventory -> Sources
[1.2] Once clicked on Add New Source Button
There are following General Form [New Create Source] field info
- Name: Put Name of Source, Required Field
- Code: Put Code of Source, Required Field “can’t change the Code of the source, once filled”
- Is Enabled: Do Yes for Enabled
- Description: Put Description, Optional Field
- Latitude: Put Latitude, Optional Field
- Longitude: Put Longitude, Optional Field
[1.3] Once clicked on Contact Info Tab & expanded
There are following Address Contact Form field info
- Contact Name: Put Contact Name, Optional Field
- Email: Put Email, Optional Field
- Phone: Put Phone, Optional Field
- Fax: Put Fax, Optional Field
[1.4] Once clicked on Address Data Tab & expanded
There are following Address Data Form field info
- Country: Select country from drop down country list, Required Field
- State/Province: Put State/Province, Optional Field
- City: Put City, Optional Field
- Street: Put Street, Optional Field
- Postcode: Put Postcode, Required Field
[1.5] Finally, clicked on Save Button.
[2] Multi Source Inventory Stocks
[2.1] Go to Admin -> Stores -> Inventory -> Stocks
Select Stocks, redirects on Manage Stock
[2.1] Once Clicked on Add New Stock, redirects on below form
- Name: Put name of stock, Required Field [must be unique name]
- Sales Channels: Admin can assign the stock to one or more listed sales channels. The sales channel is (mostly) your Magento views.
- Sources: Admin need to choose those Assign Sources., to apply to the new stock. Then, click Done.
[2.3] Finally clicked on Save Button
MSI allows to delete the product stocks and Admin can reassign any sales channel and sources to the Stocks. If a sales channel is not assigned to a custom stock, it will be assigned to the Default Stock.
Except default product stock, all other stocks can be modified as Stock Name , Stock sales channel and the assigned sources.
Once the sources are created and stocks are linked to the respective website, Next Step, MSI Saleable Quantity
MSI Saleable Quantity :
This presents in Product Grid Page as ‘Quantity per Source’ and ‘Salable Quantity’.
Go To Catalog -> Products
The following terms are important as you work with Inventory Management APIs:
[a] – Sources:: represent physical locations that store and ship available products. These locations can include warehouses, brick-and-mortar stores, distribution centers, and drop shippers. (Any location can be designated as a source for virtual products.)
[b] – Stocks:: map a sales channel (currently limited to websites) to source locations and on-hand inventory. A stock can map to multiple sales channels, but a sales channel can be assigned to only one stock.
[c] – Aggregate Salable Quantity:: is the total virtual inventory that can be sold through a sales channel. The amount is calculated across all sources assigned to a stock.
[d] – Reservations:: track deductions from the salable quantity as customers add products to carts and complete checkout. When an order ships, the reservation clears and deducts the shipped amounts from specific source inventory quantities.
Briefly Explained With Example
In this below diagram, a bicycle merchant has inventory for a mountain bike in two warehouses and a drop shipper. He has two stocks with configured website sales channels and sources. When a customer shops through the UK website, Magento aggregates bike inventory from the UK warehouse and the drop shipper sources, for a salable quantity of 95. The bike can be shipped from either the warehouse or the drop shipper, but not the NY warehouse. Amazon Marketplace has the same stock, drawing from the same aggregate stock as the UK website.
[a] – Source – Defines a physical stock.
[b] – SourceItem – A relation object that represents the amount of a specific product at a physical source. We use this entity for updating inventory on each source. Quantities might change as a result of synchronizing with an external Product Information Management (PIM) or Enterprise Resource Planning (ERP) system, or internally as a stock deduction during the checkout process. A SourceItem cannot be used for retrieving data that must be rendered on front-end, because only aggregated data should be used for all validations and UI representation.
[c] – StockItem – Also known as Aggregated Virtual Stock. This is read-only data that the re-indexation process generates. Based on a pre-defined mapping, we define what sources are assigned to the current scope (sales channel) and aggregate quantities from all assigned sources. We also use StockItem to check if a product is in or out of stock. Making this segregation by Read-Only interface (StockItem) and Write-Only interface (SourceItem), the Inventory architecture achieves Command Query Responsibility Segregation (CQRS). As a result, all GET HTTP requests should use StockItem entity, and all POST/PUT should use SourceItem.