0

After 3 months of upgrading a Magento 2.0 to 2.3, I noticed many stock inconsistencies like items reserved and never removed, and the orders are closed.

Why does it happen and how could I check it?

1 Answer 1

1

What causes reservation inconsistencies?

Inventory Management generates reservations for key events:

  • Order placement (initial reservation)
  • Order shipment (compensation reservation)
  • Refund order or issue a credit memo (compensation reservation)
  • Order cancellation (compensation reservation)

Reservation inconsistencies may occur when Inventory Management loses the initial reservation and enters too many reservation compensations (overcompensating and leading to inconsistent amounts) or correctly places the initial reservation but loses compensational reservations.

The following configurations and events can cause reservation inconsistencies:

  • The payment method or your team isn't completing the order life cycle. Leaving the order open (e.g. processing status) forever.

  • You push new stock quantity or orders at a certain frequency and do not consider the number of product reservations you have on synchronization time.

  • Upgrade Magento to 2.3.x with orders not in a completed state (Complete, Canceled, or Closed). - Inventory Management will create compensational reservations for these orders, but it will not enter or have the initial reservation that deducts from the salable quantity. We recommend using these commands after upgrading to Magento v2.3.x from 2.1.x or 2.2.x. If you have pending orders, the commands correctly update your salable quantity and reservations for sales and order fulfillment.

  • You do not manage stock then later change this configuration. You may start using 2.3.x with Manage Stock set to "No" in the Magento configuration. Magento does not place reservations at order placement and shipment events. If you later enable the Manage Stock configuration and some orders were created at that time, the Salable Qty would be corrupted with compensation reservation when you handle and fulfill that order.

  • You re-assign the Stock for a Website while orders submit to that website. The initial reservation enters for the initial stock and all compensational reservations enter the new stock.

  • The sum total of all reservations may not resolve to 0. All reservations in the scope of an Order in a completed state (Complete, Canceled, Closed) should resolve to 0, clearing all salable quantity holds.

Reservations place a salable quantity hold for product SKUs per stock. When you ship, add products, cancel, or refund an order, compensation reservations enter to place or clear these holds.

Resolve reservations inconsistencies

MSI provides two CLI commands to check and resolve reservation inconsistencies:

  • inventory:reservation:list-inconsistencies
  • inventory:reservation:create-compensations

References: Magento CLI Reference and How to resolve Magento 2 stock inconsistencies?

If you don't have an updated MSI module that includes the CLI command to fix it, you might be able to fix it directly via DB checking this question: How to fix Magento 2 MSI inventory reservation inconsistencies directly via DB?

4
  • Does an order stuck in Payment Review counts towards the inconsistencies ? Commented Nov 20, 2023 at 11:59
  • Yes @JulianoVargas, Some payment methods do not complete the order cycle, leaving reservations uncleaned. I've added it to the list of possible inconsistencies. Commented Nov 21, 2023 at 16:27
  • Thanks, I'm very often only finding out after months that the order payment stayed at Payment Review I you saying some payment methods there should be an automation process to send status after while close them with status closed? Commented Nov 21, 2023 at 16:35
  • Yes, the payment methods usually can't keep the amount captured without processing them for 7 days max. During this period, they will decline to process the payment or process it. If their module/extension doesn't have it implemented, you can implement it. Maybe it's just a manual process that the merchant team needs to consider when processing the day's orders. Commented Nov 21, 2023 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.