-
Notifications
You must be signed in to change notification settings - Fork 253
Create Stock
After you create your sources, you can create stock to map locations and inventory to sales channels. The stock determines the aggregated inventory amount for all assigned sources. As customers add products to cart and complete checkout, the sales channel checks against the stock for available salable quantities.
- Sales Channel Support - Sales channels currently include websites out-of-the-box. You can extend sales channels to include custom options like B2B customers groups and store views. Each sales channel can only have a single stock assigned to it. A single stock can be assigned to multiple websites.
- Map to Sources - Each stock can have one or more enabled or disabled sources assigned, calculating the virtual aggregated inventory per product.
- Priority Order Fulfillment - The out-of-the-box Priority algorithm for the Source Selection Algorithm uses the stock's source list from top-to-bottom when fulfilling orders.
All stores begin with a Default Stock. Create and configure stocks as needed to best fit your stores and order fulfillment. When you assign new stock to a sales channel, any pre-existing stock in that sales channel becomes unassigned.
With a multisite configuration, configure your stocks according to priority based on geography, size of warehouses, and so on. The following are a few examples of source priority:
- For a German website, you may prioritize sources as Germany to England to France with the United States as the lowest priority. These orders fulfill through Europe with a fall-back option of the US.
- For orders originating in New York, you may prioritize warehouses in New York to Florida to Texas. For all other orders in the US, you may have the Texas warehouse as highest priority to Florida to New York.
If you are a Single Source merchant, meaning you have a single source fulfilling orders to multiple sales channels, edit and use the Default Stock. This stock will have all websites and custom sales channels assigned to the Default Source. ou may have multiple websites and sales channels assigned to the Default Source. Modify the Default
If you are a Multi Source merchant, meaning you have one or more sales channels with one or more sources fulfilling orders, create new stocks as needed. Each sales channel can only be assigned to one stock, with one or more sources as needed. You can edit the Default Stock or leave it alone.
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 at three Sources with a configured Notify for Quantity Below through the Assigned Sources. For example, the Warehouse source has an available quantity of 50 with a notify threshold of 10, giving a source salable quantity of 40.
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.
Note: The Salable Quantity displayed on the product page deducts all thresholds for at a glance aggregated totals.
The merchant creates three Stocks. Only one Sales Channel can be associated with one Stock. As all Sales Channels are websites, they can assign multiple websites to a stock, but not to more than one stock: two websites (DE and NL) to one stock and individual stocks for the marketplace (eBAY) and other website (UK).
Each stock collects all quantities from each assigned source and deducts the Notify for Quantity Below and Only X Left amounts to aggregate the Salable Quantity. For example, Bicycle Shop UK Stock accesses inventory from all three sources:
- The salable amount per source is 40, 15, and 5 for a total of 60.
- The Only X Left for all stores is 5.
To determine the final salable amount for Sample Product 1 through the UK webstore, the total has the threshold of 5 deducted for a final amount of 55. Customers can add up to 55 of the product to their carts, completing purchases.
If you are a Single Source merchant, meaning you ship all products from one location, edit and use the Default Source. This source has all product inventories associated to the source by default, requiring only location details and configurations entered.
If you are a Multi Source merchant, meaning you ship products from multiple locations, create new sources for each location. You can edit the Default Source or leave it alone.
After creating sources, you can assign product stock and set inventory amounts.
-
On the Admin sidebar, tap Stores. Then under Settings, choose Manage Stocks.
-
In the upper-right corner, tap Add New Stock.
![]() |
|---|
| New Stock Page |
-
(Required) Enter a unique Name for the stock.
-
In Sales Channels, assign the stock to one or more listed sales channels. Out-of-the-box, it lists all Magento websites. You can select multiple websites.
Important: If you select a website or sales channel assigned to another stock, it will be unassigned from that stock to this one.
![]() |
|---|
| Assign Sales Channel |
-
In Sources, click Assign Sources to add a source to this stock.
-
On the Assign Sources page, click the checkboxes for the sources you want to apply to the new stock. Click Done to add.
![]() |
|---|
| Assign Sources |
-
Set the prioritization of the sources in the Assigned Sources grid.
The topmost source has top priority for inventory and fulfillment. Drag-and-drop to modify the source priority.
Note: This priority is used by the Source Selection Algorithm - Priority when determining shipment from source stock.
-
When done, tap Save & Continue or Save & Close to return to the Manage Stock page.
After adding sources to the stock, arrange those sources from top to bottom in priority for fulfilling orders. The Source Selection Algorithm (SSA) uses this priority from add to cart through the order shipment and management. You can assign enabled and disabled sources to your stocks. If disabled, the source is skipped by the SSA when managing inventory and orders.
Note: The configured sources priority on stocks does not influence the Assigned Sources configured when editing your products.
The following images detail assigning and prioritizing sources for stock associated with a UK website. For this stock, the merchant added the sources for Default Source, London Overflow, and London.
![]() |
|---|
| Initial Sources Added to the Stock |
To move a source up or down, click the drag handle on the left and drag the source's rectangle. For this stock, the merchant wants to fulfill orders using the London > London Overflow > Default Source sources in that order. As needed, the temp location for overflow in London may be enabled or disabled as needed.
![]() |
|---|
| Updated Source Priority for the Stock |
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





