Amazon Forecast
Developer Guide

RETAIL Domain

The RETAIL domain supports the following dataset types. For each dataset type, we list required and optional fields. For information on how to map the fields to columns in your training data, see Dataset Domains and Dataset Types.

TARGET_TIME_SERIES Dataset Type

The target time series is the historical time series data for each item or product sold by the retail organization. The following fields are required:

  • item_id (string) – A unique identifier for the item or product that you want to predict the demand for.

  • timestamp (timestamp)

  • demand (float) – The number of sales for that item at the timestamp. This is also the target field for which Amazon Forecast generates a forecast.

Although the following field is optional, Amazon Forecast suggests that you include it:

  • location (string) – The location of the store that the item got sold at. This is optional and should be used only if you have multiple stores/locations.

Ideally, only these required and suggested optional fields should be included. Other additional time series information should be included in a RELATED_TIME_SERIES dataset.

You can provide Amazon Forecast with related time-series datasets, such as the price or the number of web hits the item received on a particular date. The more information that you provide, the more accurate the forecast. The following fields are required:

  • item_id (string)

  • timestamp (timestamp)

Although the following fields are optional, Amazon Forecast suggests that you include them:

  • price (float) – The price of the item at the time of the timestamp.

  • webpage_hits (float) – The number of web page hits received by the item at the timestamp. Applies only to ecommerce websites.

  • stockout_days (float) – The number of days left before the item goes out of stock. This is an optional field. Provide it only if the data is available.

  • inventory_onhand (float) – The number of items in inventory.

  • revenue (float) – The total revenue generated by that item’s sales.

  • in_stock (integer; 1=true, 0=false) – A flag that specifies whether the item is in stock.

  • promotion_applied (integer; 1=true, 0=false) – A flag that specifies whether there was a marketing promotion for that item at the timestamp.

In addition to the required and suggested optional fields, your training data can include other fields.

ITEM_METADATA Dataset Type

This dataset provides Amazon Forecast with information about metadata (attributes) of the items whose demand is being forecast. The following fields are required:

  • item_id (string)

Although the following fields are optional, Amazon Forecast suggests that you include them:

  • category (string)

  • brand (string)

  • color (string)

  • genre (string)

In addition to the required and suggested optional fields, your training data can include other fields. To include other fields in the dataset, provide the fields in a schema when you create the dataset.