InventSum table cannot be used directly for WHS-enabled items. For more information, see this blog post.
On-hand calculation algorithm The following steps provide a high-level overview of the algorithm that determines the available on-hand quantity for an item and a set of inventory dimensions: 1. Determine the available on-hand quantity, based on the exact dimensions. This is the lowest level in the hierarchy. 2. Determine the smallest available quantity from all levels above the level found in step 1. 3. Return the smaller of the quantities found in step 1 and step 2. This is the available quantity. For example, based on the data in the previous table, the available physical quantity is calculated for the following dimensions: • Site: Site1 • Warehouse: WH1 • Inventory status: Good • Location: Bulk In step 1 of the algorithm, the quantity is 12, because that is the quantity that is available on the location level. However, in step 2, the smallest quantity from the levels above the location level is 10. Therefore, in step 3, the available physical quantity is 10, which is the smaller of 12 and 10. Calculations of on-hand quantity for work transactions are done differently. The on-hand quantity is determined only up to the location level, because work affects reservations only on the location level and lower. For example, based on the data in the previous table, the available physical quantity is calculated for work on the following dimensions: • Site: Site1 • Warehouse: WH1 • Inventory status: Good • Location: Bulk In this case, the available physical quantity is 12, because the quantity is determined only up to the location level.
Details about the implementation of on-hand calculations The on-hand information is stored in a new table called WHSInventReserve. The WHSInventReserveDelta table is used to track changes that the current transaction causes in the on-hand quantity. On the final commit, the WHSInventReserve table is updated based on the changes in the WHSInventReserveDelta table. Because many scenarios involve calculating on-hand quantities based on itemId, InventDim, or InventSum records for both WHS-enabled and non-WHS-enabled items, APIs are provided to support the calculations in a seamless way. The following example shows how to instantiate the class that can be used to calculate availability for both WHSenabled and non-WHS-enabled items.
6
Reservations in Warehouse management White Paper