Price History Load

Certain applications, such as Lifecycle Pricing Optimization, require price history to perform their calculations. Price history is similar to inventory in that it is a positional, but it can be loaded in a more compressed manner due to the extremely high data volumes involved. The required approach for price history is as follows:

  1. Update C_HIST_LOAD_STATUS for the PRICE records in the table, specifying the last date of history load, just as you did for inventory. For whatever value you put in the HIST_LOAD_LAST_DATE column, ensure that you load price data up to and including that date. There is logic in the history load to refresh the W_RTL_PRICE_IT_LC_G table; that logic only runs on the final day of historical processing. But, if you don’t load files all the way up to that date, it will never run and you may have incorrect data as a result. If you are loading history after your nightly batches already started, then you must set this date to be the last week-ending date before your first daily/weekly batch. No other date value can be used in this case.

  2. If you are loading prices for LPO applications specifically, then go to C_ODI_PARAM_VW in the Control Center and change the parameter RI_LAST_MKDN_HIST_IND to have a value of Y. This will populate some required fields for LPO markdown and promotion price history.

  3. Create an initial, full snapshot of price data in PRICE.csv for the first day of history and load this file into the platform using the history processes in this section. All initial price records must come with a type code of 0.

  4. Create additional PRICE files containing just price changes for a period of time (such as a month) with the appropriate price change type codes and effective day dates for those changes. Load each file one at a time using the history processes.

  5. The history procedure will iterate over the provided files day by day, starting from the first day of history, up to the last historical load date specified in C_HIST_LOAD_STATUS for the pricing fact. For each date, the procedure checks the staging data for effective price change records and loads them, then moves on to the next date.

The process to perform price history loads is similar to the inventory load steps. It uses the PRICE.csv file and the HIST_CSV_PRICE_LOAD_ADHOC process (the price load only has one load process instead of two like sales/inventory). Just like inventory, you must load the data sequentially; you cannot back-post price changes to earlier dates than what you have already loaded. Refer to Data File Generation for complete details on how to build this file.

Just like inventory, the REJECT_DATA_CLEANUP_ADHOC process may be used when records are rejected during the load. Price loads cannot continue until you review and clear the rejections.

{
  "cycleName": "Adhoc", 
  "flowName":"Adhoc", 
  "processName":"REJECT_DATA_CLEANUP_ADHOC",
  "requestParameters":"jobParams.REJECT_DATA_CLEANUP_JOB=PRICE"
}

If you will not be loading a complete history file, or you want to skip history and run price seeding or nightly cycles, then you must be aware of the nightly job behavior as it relates to history. The nightly batch job W_RTL_PRICE_IT_LC_DY_F_JOB has a validation rule that looks for history data and fails the batch if it is not found. It is looking specifically in the table W_RTL_PRICE_IT_LC_G, because this table must be populated when the price history job runs for the last date (the value in HIST_LOAD_LAST_DATE). The reason for this validation is that the system calculates many additional fields like LAST_MKDN_DT that need to include your historical price activity. If you run the nightly batch jobs without populating W_RTL_PRICE_IT_LC_G, all calculated fields will start as null or having only the current night’s price data. If you are not planning to load complete price history up to the value on HIST_LOAD_LAST_DATE, then you may disable this validation rule from C_ODI_PARAM_VW in the Manage System Configurations screen. Look for the RI_CHK_PRICE_G_EMPTY_IND parameter and update the value to N. This will allow W_RTL_PRICE_IT_LC_DY_F_JOB to complete even if no history has been loaded and the W_RTL_PRICE_IT_LC_G table is empty.