-
Notifications
You must be signed in to change notification settings - Fork 253
MSI features and processes
Note: This page is in progress and will detail MSI features and workflow.
When configuring stock, you specify sources and priority to supply stock for sales channels. A source can have priority in the scope of stock in one warehouse, but not necessarily in all warehouses as the source can be re-used in different stocks. The number of stocks and sources adds to the complexity for determining the best warehouse or store to fulfill an order.
Received orders per sales channel initiates the SSA to update inventory amounts per source, determine the best matching source, and reserve inventory. When you fulfill orders with multiple SKUs, the SSA may set multiple sources to fulfill. As a result, merchants may fulfill orders entirely from one source or in partial shipments between multiple sources.
As you add sources, inventory, and carriers, we recommend rerunning the SSA during order shipment to ensure the best possibly options are provided to ensure reduced costs, better inventory management across your sources, and so on.
![]() |
|---|
| Multi Source Inventory management in Magento |
A high-level look at the process:
- A customer shops in a sales channel, like a website.
- Products add to the cart, verifying the total available inventory for added products.
- Reservations save as products are purchased, setting aside products for the order.
- When invoicing and shipping the product, you verify the inventory and recommendations for shipment. Fulfill the order by shipping from one or more sources, using MSI recommendations or overriding to send partial amounts, and so on.
- Reservations deduct from the product inventory at invoicing and shipment.
Sources are the physical locations where product inventory is managed and shipped for order fulfillment, or where services are available. These locations can include warehouses, brick-and-mortar stores, distribution centers, and drop shippers. You allocate inventory quantities to these sources, and MSI automatically aggregates the total salable products for your stocks. You may have multiple sources in different geographic locations by country and continent, locations in a city, based on the type of inventory, even services.
For example, you may have a limited number of products available from your brick-and-mortar locations with an extensive inventory in your warehouses, and services in key locations with limited availability.
You start with a Default Source you can update but not disable. This source is used by Single Source Merchants and for product migration. You always need a default source.
Stock represents a virtual, aggregated inventory of products for sources of your sales channels (currently these are websites). Depending on your site configuration, the stock may be assigned to one or more sales channels. Each sales channel can only have a single stock assigned to it, and a single stock can be assigned to multiple websites. Through the stock, you can modify the prioritization of sources used as orders come through a website.
You start with a Default Stock you can update but not disable. This stock is used by Single Source Merchants and for product migration. You always need a default stock.
Sales Channels represent entities selling your inventory. MSI includes Magento store websites out-of-the-box and supports extensions for additional channels (for example, B2B customers groups and store views). Sales Channels can only be associated to one Stock. In the case of website sales channels, you can have multiple websites associated to the same stock.
The following diagram helps define how a Stock works in relation to Sources and Sales Channels for a Bicycle Shop merchant.
![]() |
|---|
| Relation of Sources and Sales Channels to Stocks |
The example tracks the inventory of Sample Product 1 in MSI. The merchant has four Sales Channels including an eBay Marketplace and three websites (Germany, Netherlands, and the UK). The stores have an Only X Left threshold of 5 configured. The merchant creates three Stocks with assigned Sales Channel websites: two websites (DE and NL) to one stock and individual stocks for the marketplace (eBAY) and other website (UK).
For example, Bicycle Shop UK Stock accesses inventory from all three sources. MSI aggregates totals and handles inventory reservations through the stock:
- For the UK Stock, the salable amount per source is 40, 15, and 5 for a total of 60 after deducting the Notify for Quantity Below per product source.
- The Only X Left for all stores is 5.
- To determine the final salable quantity for Sample Product 1 through the UK webstore, the total has the threshold of 5 deducted for a final amount of 55.
As a result, customers can purchase up to 55 of the product from UK stock. As products add to carts, reservations track through purchase and deduct inventory at shipment from specified source linked to the stock.
With multiple source locations and carriers with various shipping options and fees, knowing your actual available inventory and finding the best shipment option can be difficult. MSI uses the Source Selection Algorithm (SSA) to do the work for you, calculating the best methods and making recommendations.
Track Inventory: Using stocks and sources, the SSA checks the sales channel of incoming product requests and determines available inventory:
- Gets the list of all sources for the associated stock per sales channel
- Calculates the total salable quantity by pulling the amounts from all sources, deducting all threshold values
- Allows adding the amount of products to the cart if enough inventory exists or backorders are enabled
Manage Shipments: The algorithm helps again when you ship orders. You can rerun the algorithm to get recommendations on the best sources for shipping the product. Or override the selections to:
- Ship partial shipments, sending only a few products from specific locations and completing the full order at a later date.
- Ship the entire order from one source.
- Break the shipments across multiple sources in different amounts to keep a balanced stock across all warehouses and stores.
Note: SSA functions differently for Virtual and Downloadable products, which may not incur shipping costs. In these cases, the system runs the algorithm implicitly when it creates invoices, and always uses the suggested results. You cannot adjust these results for Virtual and Downloadable products.
MSI comes with the SSA Priority algorithm out-of-the-box. The algorithm primarily recommends product deductions per source when invoicing and shipping the order.
This algorithm considers the configured priority set at the stock level when fulfilling orders:
- Works through the list of sources in order from top to bottom
- If the source has a virtual aggregated available stock, it recommends deductions and shipments from that source first.
- Continues down the list until the order shipment is filled.
- Skips disabled sources if found in the list
MSI supports custom development and extensions to add alternative algorithms to prioritize sources. For example, you can have one priority algorithm based upon geography and another based upon expense of stock or a customer attribute. When the cost of stock changes, your implementation can easily change algorithms to ensure the lowest cost.
The Concurrent Checkout feature tracks and reserves sales, preventing sales from overselling stock, but only when each source is assigned to one stock. As products are added to cart and checkout completes, MSI enters a reservation against the aggregated product quantity. This protects the inventory through to shipment, ensuring customers correctly receive their ordered products. Reservations clear when the order is invoiced (deducting quantities) or an order is cancelled before invoice and shipment.
This feature, reservations, and the entire process is transparent to customers. They see information on stock quantities as normal through the product page and notifications through checkout.
If you assign each source to only one stock, then you will never run into the situation where you could potentially oversell inventory when multiple users are checking out at the same time. In rare cases, you potentially have issues with overselling when you assign one or more sources to more than one stock. The situation may occur when customers compete for the last remaining stock of a product.
Reservations track stock requests for the entire shopping process: adding products to cart, completing checkout, and managing refunds. For available inventory and stock, reservations enter against the aggregated inventory when the customers enters a product amount and adds to cart without reducing the actual inventory amount. These reservations place a temporary hold for that amount of inventory. When the checkout completes and payment is processed, the reservations remain in place. Inventory amounts change during fulfillment with the completed invoice. Merchants can modify sources during fulfillment as stock changes and updates.
Multi-Source Inventory developed by Magento 2 Community
- Technical Vision. Catalog Inventory
- Installation Guide
- List of Inventory APIs and their legacy analogs
- MSI Roadmap
- Known Issues in Order Lifecycle
- MSI User Guide
- 2.3 LIVE User Guide
- MSI Release Notes and Installation
- Overview
- Get Started with MSI
- MSI features and processes
- Global and Product Settings
- Configure Source Selection Algorithm
- Create Sources
- Create Stock
- Assign Inventory and Product Notifications
- Configure MSI backorders
- MSI Import and Export Product Data
- Mass Action Tool
- Shipment and Order Management
- CLI reference
- Reports and MSI
- MSI FAQs
- DevDocs Documentation
- Manage Inventory Management Modules (install/upgrade info)
- Inventory Management
- Reservations
- Inventory CLI reference
- Inventory API reference
- Inventory In-Store Pickup API reference
- Order Processing with Inventory Management
- Managing sources
- Managing stocks
- Link and unlink stocks and sources
- Manage source items
- Perform bulk actions
- Manage Low-Quantity Notifications
- Check salable quantities
- Manage source selection algorithms
- User Stories
- Support of Store Pickup for MSI
- Product list assignment per Source
- Source assignment per Product
- Stocks to Sales Channel Mapping
- Adapt Product Import/Export to support multi Sourcing
- Introduce SourceCode attribute for Source and SourceItem entities
- Assign Source Selector for Processing of Returns Credit Memo
- User Scenarios:
- Technical Designs:
- Module Structure in MSI
- When should an interface go into the Model directory and when should it go in the Api directory?
- Source and Stock Item configuration Design and DB structure
- Stock and Source Configuration design
- Open Technical Questions
- Inconsistent saving of Stock Data
- Source API
- Source WebAPI
- Sources to Sales Channels mapping
- Service Contracts MSI
- Salable Quantity Calculation and Mechanism of Reservations
- StockItem indexation
- Web API and How To cover them with Functional Testing
- Source Selection Algorithms
- Validation of Domain Entities
- PHP 7 Syntax usage for Magento contribution
- The first step towards pre generated IDs. And how this will improve your Integration tests
- The Concept of Default Source and Domain Driven Design
- Extension Point of Product Import/Export
- Source Selection Algorithm
- SourceItem Entity Extension
- Design Document for changing SerializerInterface
- Stock Management for Order Cancelation
- Admin UI
- MFTF Extension Tests
- Weekly MSI Demos
- Tutorials

