Magento 2 – MSI Inventory_reservation

Hi! I’m trying to understand how the reservation process works in Magento with MSI. We have the 2.4.3 version. I am not a developer but I do use a lot the admin and know some stuff about the Magento database.

In the last weeks I have been reading a lot about the Inventory Reservation table, but there are some things that i do not find it clear. Here’s what I got:

Every time an order is placed, it will automatically create a row with the SKUs of that order with a negative reservation with the event type “order_placed“. If the order is cancelled then a positive reservation with the event type “order_cancelled” so it clears with the cron. Same thing when the shipment is created with the “shipment_created” and the “order_place_failed“. Please correct me if I’m wrong.

Now, here’s where i get stuck with some situations that we have encountered. We have some reservations that do not have an order created in the Sales Order table. I believe this was because an error when the customer was placing the order, but there’s no “order_placed_failed” event that compensates the original reservation. Is it this way? Why it wouldn’t create that positive reservation with the other event?

On the other hand, I have some issued with that reservations that do have an order created which are in “new” state and “pending” status. which already have a row of “order_place_failed” as well. How could it be that the order was created? I can’t find a logic about that.

And the last situation is that sometimes when an order is cancelled, Magento sometimes creates more than one row of “order_cancelled” for the same SKU, so it never compensates correctly to 0 and we have to delete those rows manually. Is that common as well?

Thanks so much in advance and I’m sorry about my english. I’m trying to understand the behaviour of the table in the best way as possible for a better understanding of it.

submitted by /u/Nachios
[link] [comments]