Skip to content

MSI features and processes

Ievgen Shakhsuvarov edited this page Jul 16, 2019 · 28 revisions

DEVELOP User Guide - This guide provides MSI Develop Branch/Active Development merchant information on Magento Multi Source Inventory (MSI) features and project.


Multi Source Inventory (MSI) introduces new features to Magento Inventory Management to better support multiple sources, sales channels, and sources to clearly track available and salable quantities. These features scale and support Single Source and Multi Source merchants as their business changes.

Multi Source Inventory Management in Magento

A high-level look at the process:

  1. A customer shops in a sales channel, like a website.
  2. Products add to the cart. Magento verifies the total available inventory for added products across all sources.
  3. Reservations generate and set aside inventory quantities as products are purchased. Actual inventories are not deducted yet.
  4. Single orders generate into Magento for single and multiaddress orders (many single orders per address).
  5. 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.
  6. Reservations deduct from the product inventory at invoicing and shipment, updating inventory quantities for all affected sources.

Sources

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 Inventory Management 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.

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.

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.

The following diagram helps define the Sources for a Bicycle Shop merchant, available to stocks and accessible by the SSA.

Sources with Products in MSI

The example tracks the quantities, thresholds, and calculated salable quantities for a sample product across multiple locations. These include two stores, a warehouse, and a distribution center.

  • The sources are assigned to the products through the catalog.
  • Quantities are tracked per source.
  • Salable quantities are aggregated and calculated for a stock. The amount aggregates all quantities per source assigned to a stock, subtracting the Out-of-Stock Threshold (or MinQty).
  • All sources use the default Notify for Quantity Below amount of 5. The UK Distribution center overrides the notification amount through the source with a setting of 20.

These sources can be assigned to stocks, all quantities available to the SSA for aggregating salable quantities per sales channel.

Stock

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. 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.

Salable Quantity

MSI introduces a Salable Quantity displayed through the Product grid. The value displays in a column next to Quantity per product for Multi Source merchants. The amount is an aggregated total of product inventory available for purchase for a stock. MSI calculates this amount by subtracting the Out-of-Stock threshold from the Quantity per source, adding together all sources assigned to each stock.

The amount also subtracts any reservations active for the stock. Reservations represent product quantities on-hold that are currently ordered but not shipped. This amount calculates a virtual total of all product inventory per stock.

Example Salable Quantity per Stock

Source Selection Algorithm

With multiple source locations, global customers, 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 from tracking inventory salable quantities across all sources to calculating and making recommendations for partial and full shipments.

Track Inventory: Using stocks and sources, the SSA checks the sales channel of incoming product requests and determines available inventory:

  • Calculates the aggregated virtual salable quantity of all assigned sources per stock: aggregates Quantity - Out-of-Stock Threshold per source
  • Subtracts the Out-of-Stock Threshold amount from salable quantity to protect against overselling and support concurrent checkout
  • Reserves inventory quantities at checkout, deducting from in-stock inventory at order processing and shipment
  • Supports backorders with enhanced options for negative thresholds

Manage Shipments: The algorithm helps when you process and ship orders. You can run the algorithm to get recommendations for the best sources to ship partial or all products 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 order into partial shipments across multiple sources in different amounts to keep a balanced stock across all warehouses and stores.

The SSA is able extensible for third party support and custom algorithms for recommending cost effective shipments.

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.

Priority Algorithm

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

Custom Algorithms

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.

Concurrent Checkout

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

Instead of immediately deducting or adding product inventory quantities, reservations hold inventory updates until order shipment or product refunds. Reservations work entirely in the backend to automatically update inventory totals. Understanding these holds is helpful for MSI processes.

Order reservations

Reservations place holds on inventory quantities, affecting the salable quantity when submitting an order. The reservations are at the stock level, against a SKU. The amount is deducted from the salable quantity without affecting the actual product quantity.

At the time of shipment, you select the source to deduct product quantities and fulfill the order. When shipping the order, you can use the SSA recommendations or manually enter quantity deductions per source. When shipped, the reservations are automatically cleared and the quantity deducted. The salable quantity recalculates for the stock with an updated quantity and any reservation amounts still in the system.

The following diagram helps define the process of reservations during an order and through to shipment.

Reservations for an Order

A customer submits an order. Magento checks the current inventory salable quantity. If enough inventory is available at the stock level, a reservation enters placing a temporary hold for the product SKU (for that stock) and recalculates the salable quantity.

After invoicing the order, you determine the product amounts to deduct and ship from our sources. The shipment is processed and sent from the source(s) to the customer. The quantities automatically deduct form the source inventory quantity and reservations clear (through an entered reservation compensation).

Reservations and Salable Quantity

As the order is invoiced, you determine the sources and inventory quantities to deduct and ship. The shipment continues from those sources, sent to the customer. The quantities automatically deduct from the source inventory quantity.

Updating reservations

As changes complete in orders and product amounts, Magento automatically enters reservation compensations. You do not need to enter compensations through the Admin or code to update or clear these holds. Reservations are only affected by entered reservations to put a hold on a quantity or to clear a hold amount (compensating the reservations).

Here is how they work:

  • Submitted Order: When an order submits for an amount of products, a reservation enters for that amount. For example, orderings 5 backpacks from a US website enters a reservation of -5 for that SKU and stock. The salable quantity is reduced by 5.
  • Canceled Order: When an order is canceled (all or partial), a compensation reservation enters to clear that amount. For example, canceling 3 backpackes enters a +3 reservation for that SKU and stock, clearing the hold. The salable quantity is increased by 3.
  • Shipped Order: When an order ships (all or partial), a compensation reservation enters to clear that amount. For example, shipping 2 backpacks enters a +2 reservation for that SKU and stock, clearing the hold. The product quantity is directly reduced by 2 for the shipment. The calculated salable quantity is also updated for the reduced stock amount, but no longer affected by the reservation.

Partial shipments

If you send partial shipments, each shipment deducts that amount from your product quantity. Any remaining reservations remain in place until they are also shipped at a later time. This keeps your salable amount current.

Canceled orders

If a customer cancels their order prior to shipment, a new reservation is entered to return the inventory amount to the source. The reservations effectively cancel each other out, not deducting the quantity from any sources. Other customers can actively purchase those product quantities through the associated stocks and sales channels.

Refunded orders

If a customer refunds and returns a shipped order, you normally enter a credit memo to handle the returns. You can also enter a credit memo to restore the inventory quantity. The credit memo generates a reservation for the refunded products and quantities back to the source that originally shipped the product.

When the return is processed, the reservation clears and your product quantity is updated for that source.

Check your reservations

At any time, you can check reservations for inconsistencies and resolve issues by creating or removing reservations. Use CLI commands available with MSI 1.1.2.

For a complete list and example of commands, see the CLI reference in the wiki or DevDocs.

MSI Documentation:

  1. Technical Vision. Catalog Inventory
  2. Installation Guide
  3. List of Inventory APIs and their legacy analogs
  4. MSI Roadmap
  5. Known Issues in Order Lifecycle
  6. MSI User Guide
  7. DevDocs Documentation
  8. User Stories
  9. User Scenarios:
  10. Technical Designs:
  11. Admin UI
  12. MFTF Extension Tests
  13. Weekly MSI Demos
  14. Tutorials
Clone this wiki locally