

# Transactional data


**Topics**
+ [

## Forecast
](#forecast)
+ [

## Sales history or demand
](#demand)
+ [

## Inventory level
](#inventory-level)
+ [

## Inbound orders
](#in-flight-orders)

## Forecast


Supply Planning uses two different sources and types of forecast. You can use the following source systems to retrieve forecast source:
+ *External* – Supply Planning uses the data that is being ingested into the data lake forecast entity.
+ *Demand Planning* – Supply Planning uses the forecasts from Demand Planning.
+ *None* – Supply Planning uses the sales or demand history data from the outbound order line.

Supply Planning supports two types of forecast: deterministic and stochastic. Deterministic forecasts contain only the mean of the forecast. Stochastic forecasts contain P10/P50/P90, sometimes along with mean. When mean is not provided with stochastic forecasts, Supply Planning uses P50(median) as mean.

Each forecast record has four fields to represent the demand forecast:
+ mean(double)
+ p10(double)
+ p50(also known as median, double)
+ p90(double)

Based on the configured inventory policy, different fields in this entity are required. For *sl*, p10/p50/90 is required; for *doc\$1fcst*, policy p50 or mean is required. Supply Planning uses p50 as an approximation of the mean, and for *doc\$1dem* and *abs\$1level*, none of the forecast fields are required.

**Daily planning**

Forecasts may be different for daily planning compared to weekly planning. Here is an example of the daily and weekly planning forecast requirement.

![\[Daily planning\]](http://docs.aws.amazon.com/aws-supply-chain/latest/userguide/images/daily-planning.png)


**Weekly planning**

You can use the daily planning forecast example for weekly planning, or you can also use the following example for weekly planning.

![\[Weekly planning\]](http://docs.aws.amazon.com/aws-supply-chain/latest/userguide/images/weekly-planning.png)


## Sales history or demand


Inventory policy *doc\$1dem* requires demand history to compute the historical average demand. Supply Planning gets the demand history from the *outbound\$1order\$1line* entity under the *Outbound* category. Supply Planning uses the following fields:
+ *ship\$1from\$1site\$1id*(string)
+ *product\$1id*(string)
+ *actual\$1delivery\$1date*(timestamp); when missing, use *promised\$1delivery\$1date*(timestamp)

As part of the calculation, Supply Planning uses historical outbound order lines with delivery dates in the past 30 days. The target field used for quantity is *quantity\$1delivered*; when missing, use *quantity\$1promised*. If *quantity\$1promised* is missing, then *final\$1quantity\$1requested* will be used. If all are missing, then *0* will be used.

For example, if you use Supply Planning for product “laptop” at site “TX0” on July 1, 2023, the record in *outbound\$1order\$1line* where *product\$1id=laptop*, *ship\$1from\$1site\$1id=TX0*, and *actual\$1delivery\$1date* is from June 1, 2023 to June 30, 2023. Supply Planning adds all the records and divides by 30 days to get the daily demand.

## Inventory level


Supply Planning requires a beginning inventory level to start the planning process. Supply Planning searches for the inventory level under the *entity inv\$1level* data entity. Supply Planning searches for a record with the following fields: 
+ *product\$1id*
+ *site\$1id*

Supply Planning uses *on\$1hand\$1inventory* to determine the inventory level.

## Inbound orders


Supply Planning uses *inbound\$1order\$1line* to retrieve the in-flight order quantity. If an order is delivered during the planning horizon, the quantity is considered as part of the existing supply.

Supply Planning searches for a record under *inbound\$1order\$1line* with the following fields:
+ *order\$1receive\$1date*; when missing, use *expected\$1delivery\$1date*
+ *product\$1id*
+ *to\$1site\$1id*

The following are the supported Order Types: PO (Purchase), TO (Transfer), and MO (Production or Manufacturing).

Supply Planning uses the *quantity\$1received*; when missing, use *quantity\$1confirmed* then *quantity\$1submitted* to determine the on-order quantity.