Hello Emad, the lastInventoryCount field in the ProductFacility entity stores the last stock availability of a product for a facility, that is the Available To Promise (ATP) total among all inventory items of a product in a facility, so it's correct that the lastInventoryCount field is updated each time an order is created (if product store is configured to reserve inventory of course).
If you check the field description in the product-entitymodel.xml (applications/datamodel/entitydef) file you can see clearly the goal of that field. When the item is physically shipped the value that changes is the Quantity On Hand (QOH) field of an InventoryItem. The difference between the two fields is that ATP (Available To Promise) is the quantity I still have available for other orders to come for a specific product, while Quantity On Hand (QOH) contains both items already reserved for some orders and items still available for new orders. In short: ATP = QOH - order reservations already made for an item QOH = the items I physically have on the shelf of the warehouse including both items still available and items already reserved Hope it helps. Giulio Il giorno sab 7 ott 2023 alle ore 09:27 Emad Radwan <eradwan1...@gmail.com> ha scritto: > Hello Community, > > I noticed that when I create a sales order with the 'Approved' status the > ProductFacility entity gets updated by deducting the reserved product > quantity from the last_inventory_count field. Doesn't this should happen > only when the item is physically shipped? > > Regards, > Emad > -- Giulio Speri *Mp Styl**e Srl* via Antonio Meucci, 37 41019 Limidi di Soliera (MO) T 059/684916 M 347/0965506 www.mpstyle.it