Skip to main content

Future stock

Although the title kind of makes it sound like science fiction, what this actually entails is simply exposing and including the availability of stock that will become available in your front ends. This page will go through all necessary settings with samples of corresponding service calls.

Mind that these flows are specific to Unified Orders flows - which we recommend using in general.

There are a few steps you need to take, including giving new states to the involved products, specifying new settings and altering your service requests.

Product states

First off, products can only be involved in future stock availability (AKA pre-sale of products) if the items have the following three properties (AKA statuses) set:

  • Pre-release = true
  • DisableBackOrder = false
  • UseUp = false

Purchase order requirements

For purchase orders to be considered in these flows, they have to meet these criteria:

  • Must have a requested date in the future or today;
  • They must have been confirmed;
  • May not be canceled;
  • Not yet received, but can be already shipped.

Settings

Aside from UseUnifiedOrders, the following four settings have to be configured in your environment.

SettingDescription
UseSimplifiedFutureStockCalculationtrue
FutureAvailability:PercentageAvailable0 to 100 or 0 to 1.
FutureAvailability:IgnoreOverduePurchaseOrderThresholdInDaysNumber of days past requested date a PO can be included in calculations.
eAvailability:PurchaseOrderProcessingTimeInDaysNumber of days to process a PO.

Additional information about the settings

  • FutureAvailability:PercentageAvailable - The percentage of the future stock (confirmed POs) that may taken into account when calculating the availability date of a product (pre-sale).
    • In the case of 0 to 100, a 10 would mean 10%, while in the case of 0 to 1 a 0.10 would also mean 10%.
    • For example, if there is a confirmed purchase order that is expected to be received in the future with a quantity of 40, and the setting is used with a value of 0.5, this would mean that a quantity of 20 is considered as stock available for pre-sale. Once the physical stock is received on its expected delivery date, the remaining balance would be added as available for sale.
  • FutureAvailability:IgnoreOverduePurchaseOrderThresholdInDays - The time (in days) before a purchase order that has not yet been received after its requested delivery date gets ignored in future stock calculations.
    • For example: if a PO was expected to be received by January 10th, but it's now January 15th, the PO will only be taken into account if this setting was set to 5 (or higher). When an order in the past is considered for future stock it's always treated as being delivered today.
  • FutureAvailability:PurchaseOrderProcessingTimeInDays - The time (in days) it is assumed to take after the requested date of a purchase order for it to actually become available in sellable stock.

All three settings default to null.

GetProductAvailability call

Once these are all set, and all requirements are met, we can configure our GetProductAvailability call to take advantage of the future stock. The following sample request of the call shows you the relevant aspects of the call:

new GetProductAvailability.Product()
{
ID = productID,
QuantityRequested = quantity
}
},
Options = new GetProductAvailabilityOptions()
{
QuantityAvailable = true,
FutureAvailability = true,
Delivery = new GetProductAvailabilityOptions.DeliveryAvailability
{
AvailabilityDate = true,
}
}
});

This request will result in using confirmed POs - and consuming them one by one. This means that the availability date will first consume the first incoming PO, then the second, etc.

The date that the PO is requested will be considered the day that the OU is going to have +X stock available, where X is the quantity ordered. Under the default configuration, it will mean that the AvailabilityDate of the product will be the day after that.