

# Forecast based on demand drivers


To enhance forecast accuracy while configuring your forecast, you can use demand drivers. *Demand drivers* are related time series inputs that capture product trends and seasons. Instead of depending on historical demand, you can use demand drivers to influence the supply chain based on various factors. For example, promotions, price changes, and marketing campaigns. Demand Planning supports both historical and future demand drivers.

## Prequisites to use demand drivers


Before ingesting data for demand drivers, make sure that the data meets the following conditions:
+ Make sure to ingest the demand drivers data in the *supplementary\$1time\$1series* data entity. You can provide both historical and future demand driver information. For information about the data entities that Demand Planning requires, see [Demand Planning](required_entities.md).

  If you cannot locate the *supplementary\$1time\$1series* data entity, your instance might be using an earlier data model version. You can contact AWS Support to upgrade your data model version or create a new data connection.
+ Make sure that the following columns are populated in the *supplementary\$1time\$1series* data entity.
  + *id* – This column is the unique record identifier and is required for a successful data ingestion.
  + *order\$1date* – This column indicates the timestamp of the demand driver. It can be both past and future dated.
  + *time\$1series\$1name* – This column is the identifier for each demand driver. The value of this column must start with a letter, should be 2–56 characters long, and may contain letters, numbers, and underscores. Other special characters are not valid.
  + *time\$1series\$1value* – This column provides the data point measurement of a particular demand driver at a specific point in time. Only numerical values are supported.
+ Select a minimum of 1 and a maximum of 13 demand drivers. Make sure that the aggregation and filling methods are configured. For more information on filling methods, see [Demand drivers data filling method](configuration_demand_drivers.md#filling_method_demand_drivers). You can modify the settings at any time. Demand Planning will apply the changes in the next forecast cycle.

The following example illustrates how a Demand Plan is generated when the required demand driver columns are ingested in the *supplementary\$1time\$1series* data entity. Demand Planning recommends providing both historical and future demand driver data (if available). This data helps the learning model to learn and apply the pattern to the forecast.

![\[Demand drivers example\]](http://docs.aws.amazon.com/aws-supply-chain/latest/userguide/images/demand_drivers_example.png)


The following example illustrates how you can set up some common demand drivers in your dataset.

![\[Demand drivers example\]](http://docs.aws.amazon.com/aws-supply-chain/latest/userguide/images/demand_drivers_example2.png)


When you provide leading indicators, Demand Planning highly recommends that you adjust the time series date. For example, say that a particular metric serves as a 20-day leading indicator with a 70% conversion rate. In this case, consider shifting the date in the time series by 20 days and then applying the appropriate conversion factor. While the learning model can learn patterns without such adjustments, aligning leading indicator data with corresponding outcome is more effective in pattern recognition. The magnitude of the value plays a significant role in this process, enhancing the model's ability to learn and interpret patterns accurately.

# Demand driver configuration


To use demand drivers, you must configure them. You can configure demand drivers only when you've ingested data in the *supplementary\$1time\$1series* data entity.

**Note**  
If you don't configure the demand drivers, you can still generate a forecast. However, Demand Planning won't use the demand drivers.

## Demand drivers data filling method


A *filling method* represents (or "fills") missing values in a time series. Demand Planning supports the following filling methods. The filling method that Demand Planning applies depends on the location of the gap in the data. 
+ Back filling – Applied when the gap is between a product's earlier recorded date and the last recorded date.
+ Middle filling – Applied when the gap is between the last recorded data point for a given product and the global last recorded date.
+ Future filling – Applied when the demand driver has at least one data point in the future and there is a gap in the future time horizon.

![\[Demand drivers filling method\]](http://docs.aws.amazon.com/aws-supply-chain/latest/userguide/images/filling_method.png)


Demand Planning utilizes the last 64 data points from the *supplementary\$1time\$1series* data entity corresponding to the demand driver for consideration. Demand Planning supports *zero*, *median*, *mean*, *maximum*, and *minimum* options for all three filling methods.

The following example illustrates how demand drivers handle missing data when data is ingested to the *price* column in the *supplementary\$1time\$1series* data entity for Product 1, that includes both history and future data.

![\[Demand drivers filling method\]](http://docs.aws.amazon.com/aws-supply-chain/latest/userguide/images/filling_method_example1.png)


## Aggregation method


Demand Planning uses the aggregation method to facilitate the integration of demand drivers at various levels of granularity by consolidating data over specific periods and granularity levels.

Time period aggregation – For example, when the *Inventory* demand driver is available at daily level but the forecast is at weekly level, demand planning will apply the aggregation method configured under the demand plan settings for inventory to use the information for forecasting.

![\[Aggregation method used by Demand Planning\]](http://docs.aws.amazon.com/aws-supply-chain/latest/userguide/images/aggregation_example1.png)


Granularity level aggregation – Here is an example of how demand planning uses the granularity level aggregation. *out\$1of\$1stock\$1indicator* is available daily at product-site level but forecast granularity is only available at product level. Demand Planning will apply the aggregation method configured under the demand plan settings for this demand driver.

![\[Granularity method used by Demand Planning\]](http://docs.aws.amazon.com/aws-supply-chain/latest/userguide/images/granularity_example.png)


# Demand driver recommendations


While configuring aggregation and filling methods for demand drivers, a general guideline is to assign *mean* aggregation for both boolean and continuous data types. To fill a missing value, use *zero* filling for boolean data while *mean* filling is suitable for continuous data.

Note that the choice of aggregation and filling method configuration depends on the data characteristics and assumptions about missing values. Here is an example.

![\[Demand driver recommendation\]](http://docs.aws.amazon.com/aws-supply-chain/latest/userguide/images/demand_driver_recommendation.png)


Demand Planning recommends adjusting the demand driver configuration to best suit your dataset needs. The demand driver configuration will impact the forecast accuracy.

On the AWS Supply Chain web application, under **Demand planning**, **Overview**, you will view the impact scores associated with demand drivers, aggregated at the demand plan level. These impact scores measure the relative influence of demand drivers on forecast. A low impact score does not indicate that the demand driver has a minimal effect on forecast values. Instead, it suggests that its influence on forecast value is comparatively lower than the other demand drivers. When the impact score is zero under certain circumstances, it should be interpreted as the demand driver has no impact on the forecast values. Demand Planning recommends revisiting the aggregation and filling method configuration applied to that particular demand driver.