Promotions

Technical documentation about how to setup and configure the AGR Promotions Module. Note, that the module depends on standard AGR Inventory v6.2 or newer to be installed.


Run Installation Scripts

The release files can be retrieved from http://releases.local/ under Promotion Module by downloading the release package release/promo/6.x.x.zip. The package includes the db scripts for prod and stg2. The module is mostly run on prod, but if you are setting the module up against stg1, please, read the chapter about stg 1 installations of Promotions

STG

Step 1 - Start by running the stg db script (for stg1, skip this step and read the chapter about stg 1 installations of Promotions)

PROD

Step 1 - Start by running the prod db installation script

Step 2- Run the promo.initial_load procedure on the prod database

Make sure that you are not already using the data_element ids (5500-5999 is schema range for promotions)




Data mapping on stg

This module resides mostly on prod. Some customers have promotion schedules in external systems. We can use staging tables to map the promotions into the module, where they can plan them. If this is the case, you should create tables promo.promotion and promo.promotion_line on staging and map them into the prod tables.




Add promotion to the daily run

STG

Make sure stg_group ‘promo_data_transfer’ is a part of the daily run. It should be done automatically the initial_load




Integrate with Inventory

Promotion plans into demand

The promotions planned in the Promotion module need to be taken into account in the demand data series, which f.x. the order proposals and estimated stock depend on. To do this, change the value of the calculation property in column server_config in table dbo.data_element_series.

Standard integration is to let any planned qty from promotions take precedence in the demand over any other plan, such as the Baseline Plan or Forecast

example

If you have customized demand, you should not run the following query blindly. Compare the calculation value to the standard and make appropriate adjustments to your setup.

    -- Integrate promotion Plans into Promotions
	UPDATE dbo.data_element_series SET server_config = JSON_MODIFY(server_config,'$.generated_view.value_column_calculated.calculation','COALESCE([promo_promotion_plan_demand], [promo_inv_forecast_promotion_correlated_similar] ,[planner_baseline],IIF(itd.demand_setup = 1,ISNULL([demand_from_stores],0),ISNULL([forecast],0)))') WHERE id = 17

Activate promotional smoothing for promotions from Promotion module

For customers that have the standard promotional smoothing logic, this should happen automatically in installation, but please verify by checking out view inv.v_histories_smoothing_source on staging. This is the view that feeds item_ids and history dates to be smoothed into the promotional smoothing logic.

If you have a custom version of Promotional Smoothing, make sure to configure it so that it takes promotions from the new Promotion module into account. You can use view promo.v_histories_smoothing_source as a template.


Configurations

Customising Views

Standard views are setup in the module. In case you need to change the views to better fit the needs of your customer, please save a new version of the view with your changes instead of overwriting the standard views, otherwise your changes might get overwritten when the module gets updated or patched in the future.