There's also a fun integration problem: food manufacturers essentially lease shelf space and then the manufacturer handles all the inventory/restocking, and the store itself doesn't know or care what's there. So now you have to contact a bunch of third parties to learn what's in the store.
every vendor is assigned some shelf space and has some restocking day (like every morning for bread) when the shelves are expected to be 100% full. then they have purchases data from point of sale terminals/online orders.
the problem becomes A minus B
1)Customer picks up product, other falls on the ground and becomes damaged, product -x Equation: a-b-x where you don't know how much product is damaged 2)Product arrives in a bad batch, x number is affected, and requires manual adjustment, this doesn't happen, or happens incorrectly Equation: a-b-x where you don't know how much product is damaged 3)Customer picks up X amount, however x-y was registered as a sale Equation: a-b-y where you don't know how much product is unaccounted for 4)Delivery is expected on x day, however due to traffic/sickness/equipment failure delivery is delayed Equation: a-0, stock isn't available as it didn't arrive, however the assumption was that product arrived (trivial to fix this one, but I'm laying out scenarios).
You now have four scenarios that are guaranteed to happen around %10 of the time. Issues can be expanded to the manufacturer/border/trade agreements/ thousands of other potential scenarios that disrupt sourcing.
In terms of taking stock, it's not a trivial task to take accurate inventory on a regular basis. It's a manual problem that can only be done in a reliable fashion in most cases through estimation (therefore inaccurate).
The reason why they provide availability ratings is that it provides a clearer picture of what a customer can purchase, and in the event it has a low rating, prompt for potential replacements. It's not binary, it's a case of 'probably' or 'probably not'.
I've seen stock that should have lasted a week disappear in a day, stock mis-allocated(multiple times for the same item from multiple vendors in the same day), large volumes sold incorrectly resulting in stock adjustments, wastage from random occurrences, etc.
I hope this provides a level of insight into the complexities of
Inventory management is something that's easy in theory, and very very hard in practice.
I imagine you could get decent improvements in prediction accuracy using a more sophisticated ML model.
That said even the simple sale velocity model you describe has learnable parameters (e.g. historical data window length). This would probably be best done using an ML rather than ad hoc approach. An ML approach might be as simple as a logistic model indicating whether an item will be in stock or out of stock based on time of day + stock levels at the start of the day.