Calculating availability
The reports for the availableSupplyChange.v2,
productAvailability.v2 and dgAvailabilityChange.v2 events have
total availability, which includes safety stock that is withheld.
Suppose today is January 1 and the supplies in the system are as follows:
Supply1=lowDatetill February 1 - 10 qtySupply2=lowDatetill March 1 - 12 qtyNote:lowDaterefers to any old date in the past. Here,lowDateis considered as 1900-01-01.
Demand = 3 qty and Safety for SHP = 21 qty.The events of
availableSupplyChange.v2, productAvailability.v2,
and dgAvailabilityChange.v2 look as follows:availableSupplyChange.v2fromTsof the first availability window is thelowDatewhich is 1900,toTsis February 1, andsupplyQuantityis theSupply1which is 10 qty.- The
demandof 3 qty is matched with theSupply2of 12 qty that makes thedemandquantity as 3 in the second block. - For the
safety = 21 qty,consumedSafetyQuantitybecomes 10 qty for the first availability block and remaining is 21 - 10 = 11 qty for safety.
- The 11 qty of safety gets adjusted with the next supply on
Supply2. fromTsof the second availability window is thelowDatewhich is 1900,toTsis March 1, andsupplyQuantityis theSupply2which is 12 qty.- With the active supply of 12 qty and the
demand = 3 qtyadjusted, theconsumedSafetyQuantitybecomes 9 qty. - The remaining 2 qty of
safetygoes insafetyShortage.
To calculate the availability without considering safety in any of the events, you can manually compute the availability for each block with the following formula.{ "availableQuantity" : 0.0, "consumedSafetyQuantity" : 10.0, "demandQuantity" : 0.0, "demandShortage" : 0.0, "fromTs" : "1900-01-01T00:00:00.000Z", "fulfillmentAllowed" : true, "reservationShortage" : 0.0, "reservedQuantity" : 0.0, "safetyShortage" : 0.0, "shortageQuantity" : 0.0, "supplyQuantity" : 10.0, "toTs" : "2024-02-01T00:00:00.000Z" }, { "availableQuantity" : 0.0, "consumedSafetyQuantity" : 9.0, "demandQuantity" : 3.0, "demandShortage" : 0.0, "fromTs" : "1900-01-01T00:00:00.000Z", "fulfillmentAllowed" : true, "reservationShortage" : 0.0, "reservedQuantity" : 0.0, "safetyShortage" : 2.0, "shortageQuantity" : 2.0, "supplyQuantity" : 12.0, "toTs" : "2024-03-01T00:00:00.000Z" }Availability without considering safety = availableQuantity + consumedSafetyQuantityFor more information on definitions, see definitions.
Note:shortageQuantity=demandShortage+reservationShortage+safetyShortage.productAvailability.v2- In the
productAvailability.v2event, availability is represented using time ranges and not absolute dates.
During bothSupply1andSupply2, the supplies are active during the period that is represented bycurrentAvailabilityblock.- The
supplyQuantityforcurrentAvailabilityis the sum of supplies forSupply1andSupply2. - The
consumedSafetyQuantityis defined assafetythat we can withheld with the available supply.
- The
futureAvailabilityblock considers only theSupply2.
To calculate the availability without considering safety in any of the events, you can manually compute the availability for each block with the following formula."currentAvailability" : { "availableQuantity" : 0.0, "consumedSafetyQuantity" : 19.0, "demandQuantity" : 3.0, "demandShortage" : 0.0, "fulfillmentAllowed" : true, "reservationShortage" : 0.0, "reservedQuantity" : 0.0, "safetyShortage" : 2.0, "shortageQuantity" : 2.0, "supplyQuantity" : 22.0, "thresholdLevel" : 3, "toTs" : "2024-02-01T00:00:00.000Z" }, "futureAvailability" : [ { "availableQuantity" : 0.0, "consumedSafetyQuantity" : 9.0, "demandQuantity" : 3.0, "demandShortage" : 0.0, "fromTs" : "2020-02-01T00:00:00.000Z", "fulfillmentAllowed" : true, "reservationShortage" : 0.0, "reservedQuantity" : 0.0, "safetyShortage" : 2.0, "shortageQuantity" : 2.0, "supplyQuantity" : 12.0, "toTs" : "2024-03-01T00:00:00.000Z" } ]
When the tenant level ruleAvailability without considering safety = availableQuantity + consumedSafetyQuantityevent.alwaysPublishEventForDelMethodis enabled with delivery method and event is published despite fulfillment being disabled, then use the following formula to calculate the availability:MAX(supplyQuantity - demandQuantity - reservedQuantity-reservationShortage, 0)For more information on definitions, see definitions.Note:shortageQuantity=demandShortage+reservationShortage+safetyShortage. - The
dgAvailabilityChange.v2- The example is similar to
productAvailability.v2. For more information, see productAvailability.v2.