Calculation Parameters (Agreements)
Calculation can have various Calculation Parameters (those are the parameters of the calculation method defined in Calculation Engine Path in the Company Parameter holding the Formula Type, be it Input-Based or Formula Designer).
There are currently few predefined Calculation Parameters:
SKU – This is the SKU of the product that is being calculated by the Line Item.
FORMULA_INPUTS – This is a Map containing all inputs present and filled in the Formula that is being used for calculation.
FORECAST_DATA - This is a Map containing all Forecast data (produced by Forecast Engine) for configured periods. The Map is grouped by Period and then by Sku.
FORECAST_PERIODS - This is Map containing all configured Forecast Periods produced by libs.SharedLib.DateUtils. It can be used to retrieve start/end dates and names of each period used.
HISTORICAL_DATA - This is a Map containing all Historical data (queried from the configured Datamart) for configured periods. The Map is grouped by Period and then by Sku.
HISTORICAL_PERIODS - This is Map containing all configured Historical Periods produced by libs.SharedLib.DateUtils. It can be used to retrieve start/end dates and names of each period used. This Map contains the same amount of periods as Forecast Periods.
FORECAST_INPUTS - This Map contains all Forecast inputs that are defined by the used Forecast Engine (if used)
Other Calculation Parameters are input names defined in various places: Header, Scenario (these are the only ones not yet generated via InputManager solution, their names can be found under SCENARIO_INPUTS field in ConstConfig of AGR_ProcessingLib library), Line Item, Formula Type (both on the Formula and Broadcasted).
For example, you want to use one of the inputs present in Formula, you can use either the Input Name defined in the Formula Type Input Generation Table or use the predefined FORMULA_INPUT, which hold all inputs at once.
All Calculation Parameters should be entered into the Engine Calculation Parameters column of the appropriate Company Parameter. For Input-Based Formula Types it’s AGR_InputBasedFormulaTypes Company Parameter, the Formula Designer Formula Types automatically populate Calculation Parameters and create appropriate tables. Calculation Parameters should be separated with commas without whitespaces, for example: SKU,FORMULA_INPUTS,myInput_TableName