inventory
inventory copied to clipboard
Amend "out of stock" logic to account for unfulfilled orders properly
Description (*)
I would like to request that the logic governing how and when a product's source item status
is set to out of stock
is changed.
I believe this should happen as the saleable qty
hits 0, not when the source qty
does.
Currently, if an order reserves the last of the stock of a particular SKU, that sku's source item status
remains in stock
until the order is shipped, and the source qty
is reduced to 0.
here is an example product from our store. this was ordered, reducing the saleable qty
to 0, 3 weeks ago, but remained in stock
until today.
In the interim between the order being placed and shipped, the frontend of magento displays this item as in stock, but unpurchaseable. This is further exacerbated by being in a configurable product, where the product will show the overall stock when selected, instead of the individual stock, leading to further confusion and customer service time wasted. this appears to be a genuine bug, and I will log it as such.
If an order is delayed in any way, this can mean a product is in this limbo state for ages, until an admin manually sets it to out of stock, which has further issues if that order is then cancelled rather than shipped/completed. Then the SKU remains out of stock
while the source qty
and saleable qty
are > 0.
even without out of the ordinary delays, if an order can't be dispatched over a long holiday weekend for example, that's up to 4 days that the stock is displaying incorrectly on the store, and causing customer service requests/annoying customers away from the business.
Expected behavior (*)
add a mechanism to the reservation system to check:
source quantity - quantity required for order +/- out of stock threshold
and if this results in <=0, set souce item status
to out of stock
and then add a secondary check for when an order is cancelled/fails to put the source item status
back to in stock
on the creation of the order place failed
or order refunded
reservations to avoid the sku staying out of stock
while having saleable qty of > 0
Benefits
would make the frontend/customer experience more seamless, and lead to fewer customer service gripes for products that appear to be in stock when they aren't.
Additional information
Hi @IanFiretoys. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
Same for me at 2.4.3-p1. Still broken