Magento Open Source 2.3.x

This is the 2.3 Beta release version of Magento documentation. Content in this version is subject to change. For additional versions, see Magento Documentation and Resources.

About Source Selection Algorithm and Reservations

The heart of Inventory Management tracks every available product virtually and on-hand in your warehouses and stores. The Source Selection Algorithm and Reservations systems run in the background, keeping your salable quantities updated, checkout free of collisions, and shipment options recommended.

Source Selection Algorithm

The Source Selection Algorithm (SSA) analyzes and determines the best match for sources and shipping using the priority order of sources configured in a stock. During order shipment, the algorithm provides a recommended list of sources, available quantities, and amounts to deduct according to the selected algorithm. Inventory Management provides a provides a Priority algorithm and supports extensions for new options.

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. SSA does the work for you from tracking inventory salable quantities across all sources to calculating and making recommendations for 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 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

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

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

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

Example SSA recommendations for a Mountain Bike

Custom Algorithms

Magento 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 attributeA characteristic or property of a product; anything that describes a product. Examples of product attributes include color, size, weight, and price.. 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, Inventory Management 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 canceled before invoiceA document that provides a detailed description of a purchase, including products purchased, quantity, price, shipping cost, sales tax, and total. 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.

Order reservations

Reservations place holds on inventory quantities 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 at the stock level. The reservations remain in place, counting against the salable quantity without deducting from the actual inventory quantity.

The reservations are at the stock level, counting against quantities until the order is invoiced and shipped. When shipping the order, you can use the SSA recommendation or override to manually override the deductions per source. The reservations automatically deduct from the product quantity for the selected source(s).

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

In the example, a customer adds a product to a cart. Magento checks for available salable quantities for the products for that sales channel through the stock. If enough total inventory is available, a reservation saves that quantity temporarily for the order, deducting it from the 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.

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 issue a credit memoA document issued by the merchant to a customer to write off an outstanding balance because of overcharge, rebate, or return of goods. for 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 converts into added inventory quantities.