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?
Inventory Management generates reservations for key events:
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.
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?
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