Logic Documentation (Agreements)

See also the architecture documentation here: Architecture Diagram (Agreements).

Most of the logic used in Agreements Accelerator includes GroovyDoc, which provides additional valuable information.

Agreement Logics

AGR_FormulaBasedPricing

The core logic for Line Item calculations. The logic works in two contexts:

  1. Line Item Calculation context, which runs on each line item, calculates it and produces outputs

The agreement is calculated every time a Scenario is added. This is enabled by default – the accScenarioRecalc property within the Configuration section of the AGR_FormulaBasedPricing Agreement & Promotion Type (Agreements & Promotions > Agreement & Promotion Types) is set to true .

  1. Agreement Recalculation context, which runs during scheduled Calculation, that is used to gather data for Condition Records

The main premise of the line item logic is to run Calculation Engine (optionally run Forecast Engine) for each SKU and produce an output so the results can be saved to Condition Records.

The logic also generates various Result Matrices that allow to see the calculation results in a user-friendly way.

See the How to Add New Outputs to Line Item article for more details.

This logic – due to its size – has “separators” which group elements. The separators are empty elements with the following name pattern: ___SOME_NAME___.

Elements Description
  • WarningManager - Initializes the Warning Manager that handles most of the exceptions thrown by the Line Item Logic. For more details on WarningManager, see the Error Management (Agreements) article.

  • InputManager - Initializes the Input Manager solution from AGR_InputsLib. Configuration for the manager read from: libs.AGR_ProcessingLib.ConstConfig.INPUT_GENERATION_CONFIG.FORMULA_BASED_PRICING

  • LineItemValidation - Checks if the Line Item is valid, for now only if it’s inside a Scenario.

  • InputsGeneration - Generates Inputs from the initialized InputManager. If the logic is run in Recalculation Context, the inputs are read from api.currentItem instead.

  • InputsValidation - Checks if the Inputs are valid, for now only a check for empty Product Group is present.

  • AbortInputGeneration - Standard Abort Input Generation element.

  • __FORMULA_DATA__ - Separator element

  • FormulaData - Reads and stores the data for a selected Formula. The stored data is the Formula Company Parameter configuration, Formula Type name, name of the Engine Calculator Company Parameter and the values of the Inputs present on the Formula.

  • Formula - Extracts the Formula Company Parameter configuration from Formula Data.

  • FormulaTypeName - Extracts the Formula Type name from Formula Data.

  • EngineCalculatorParameterName - extracts the Engine Calculator Company Parameter name from Formula Data.

  • __INPUTS__ - Separator element

  • FormulaInputValues - Extracts the values of the Inputs present on the Formula from Formula Data.

  • HeaderInputs - Extracts the values of the Inputs present on the Header.

  • ScenarioInputs - Extracts the values of the Inputs present on the Scenario.

  • SelectedForecastEngineName - Reads the value of the Forecast Engine input and stores its value.

  • IsForecastUsed - Condition element that’s used to control the visibility of other elements. If SelectedForecastEngineName is not present, then Forecast is not used and some elements can be ignored.

  • ForecastInputValues - Only if Forecast is used. Extracts the values of the Forecast Engine inputs and stores them.

  • __CALCULATION_PARAMETERS__ - Separator element

  • AdditionalCalculationParameters - Allows you to add new Calculation Parameters to Calculation Engines. See How to Add New Calculation Parameters to Calculation Engines.

  • GeneralCalculationParameters - Assigns the main calculation parameters that then can be used by Calculation Engines (Forecast and Formula). The Calculation Parameters are defined here <link>

  • ___HISTORICAL_CALCULATION___ - Separator element

  • HistoricalPeriods - Only if Forecast is used. Defines the Historical Periods used for the Historical Data lookup. This element retrieves the forecastMonths flag from AGR_AdvancedConfiguration and applies it, but “to the past”.

  • HistoricalData - Only if Forecast is used. Reads the Advanced Configuration for Historical Data lookups from AGR_Historical_AdvancedConfiguration and performs the data query, based on the HistoricalPeriods. Returns the data grouped by period and SKU.

  • ___FORECAST_CALCULATION___ - Separator element

  • ForecastPeriods - Only if Forecast is used. Defines the Forecast Periods used for the Forecast Data calculations. This element retrieves the forecastMonths flag from AGR_AdvancedConfiguration and applies it.

  • ForecastEngineCalculator - Only if Forecast is used. Defines the instance of EngineCalculator for the selected Forecast Engine.

  • ForecastCalculationParameters - Only if Forecast is used. Appends GeneralCalculationParameters with Historical Data and Periods so they can be used for Forecast Engine calculations, and returns the whole structure.

  • ForecastCalculationResults - Only if Forecast is used. Calls the Forecast Engine for each period and each SKU selected and stores the Engine results grouped by Period and SKU

  • ___MAIN_CALCULATION___ - Separator element

  • EngineCalculator - Defines the instance of EngineCalculator for the selected Formula.

  • MainCalculationParameters - Appends GeneralCalculationParameters with Historical and Forecast Data and Periods so they can be used in Formula Type calculations and returns the structure.

  • CalculationResults - Calls the Formula Type Calculation Engine for each SKU and returns the result.

  • ProcessedCalculationOutputs - Performs various operations on the results returned from the Formula Calculation Engine. The operations include: Bounds application and currency and UOM conversions (based on selected Additional Output Types). Additional data is appended to the Formula Type Calculation Engine results that allow to store it in Condition Records.

  • ___OUTPUTS___ - Separator element

  • IsActiveOutput - Output element that propagates the IsActive Input value from

  • CalculationOutputsResultMatrixOutput - Output element that creates the Calculation Outputs Result Matrix.

  • ForecastCalculationOutputsResultMatrixOutput - Only if Forecast is used. Output element that creates the Forecast Calculation Outputs Result Matrix.

  • MarginChangeOutput - Only if Forecast is used. Calculates difference between Forecast and Historical margin and returns it as an output.

  • RevenueChangeOutput - Only if Forecast is used. Calculates difference between Forecast and Historical revenue and returns it as an output.

  • VolumeChangeOutput - Only if Forecast is used. Calculates difference between Forecast and Historical volume and returns it as an output.

  • OccurredWarningsOutput - Retrieves the occurred warnings to be read on Header logic. (Hidden output)

  • WarningMatrix - Displays the Warning Matrix from Warning Manager.

  • ___CONDITION_RECORDS___ - Separator element

  • ConditionRecords - This element gathers, processes and prepares the Condition Record output. The structure from this element should match what should be written into the Condition Record for this line item in a one to one fashion. This output is then read by the Record Creation Logic. (Hidden output)

AGR_FormulaBasedPricing_FormulaConfigurator

This is the Configurator logic for the Line Item that allows the selection of Formula. It also displays any Broadcasted inputs if the Formula defines them.

Elements Description
  • InputsGeneration - Initializes the Input Manager solution from AGR_InputsLib. Configuration for the manager read from: libs.AGR_ProcessingLib.ConstConfig.INPUT_GENERATION_CONFIG.FORMULA_BASED_PRICING_FORMULA_CONFIGURATOR and generates the Configurator Entries

  • BroadcastInputsGeneration - Initializes the Input Manager solution from AGR_InputsLib. Configuration for the manager is based on the selected Formula CFO, the Formula Type that’s a part of it controls the Broadcast inputs. The appropriate Input Generation Company Parameter is read, this element looks only for inputs marked as Broadcast.

AGR_FormulaBasedPricing_ProductConfigurator

This is the Configurator logic for the Line Item that displays the Product Group input that allows the SKU selection to be calculated.

Elements Description
  • InputsGeneration - Initializes the Input Manager solution from AGR_InputsLib. Configuration for the manager read from: libs.AGR_ProcessingLib.ConstConfig.INPUT_GENERATION_CONFIG.FORMULA_BASED_PRICING_PRODUCT_CONFIGURATOR and generates the Configurator Entries

AGR_FormulaBasedPricingHeader

This is the Header logic that defines the Header behavior for the Agreement. It defines inputs to be shown as well as outputs to be produced once calculation finishes. It also controls the default structure of the Agreement and Error Handling.

Elements Description
  • WarningManager - Initializes the Warning Manager that handles most of the exceptions thrown by the Line Item Logic. For more details on WarningManager, see the Error Management (Agreements) article.

  • ConstConfig - Stores Header related configuration constants.

  • InputManager - Initializes the Input Manager solution from AGR_InputsLib. Configuration or the manager read from: libs.AGR_ProcessingLib.ConstConfig.INPUT_GENERATION_CONFIG.FORMULA_BASED_PRICING_HEADER

  • InputGeneration - Generates Inputs as defined by the Configuration.

  • AbortInputGeneration - Standard Abort Input Generation element.

  • __PREPHASE__ - Separator element

  • StructureGeneration - Generates the default Structure of the Agreement (Scenario + Line Item) if such is not present. Adds inputs into all Scenarios present, if they haven’t been added yet. Validates the Folder structure, to prevent nesting.

  • __POSTPHASE__ - Separator element

  • WarningManagement - Validates if there is only one scenario active or if there are no scenarios active. More validations may be added later on.

  • ___OUTPUTS___ - Separator element

  • CalculationOutputsResultMatrix - Creates a Calculation Outputs Result Matrix that displays the currently Active Scenario Line Items.

  • ScenarioCalculationOutputsResultMatrix - To each folder adds a Scenario Calculation Outputs Result Matrix that displays the Scenario Line Items.

  • ___CUSTOM_OUTPUTS___ - Separator element

  • <custom_output> - an element that calls cProcessor.addOrUpdateOutput("ROOT", parameter). For more details, refer to How to Add New Outputs to Header.

  • ___WARNING_HANDLING___ - Separator element

  • WarningMatrix - Displays the Warning Matrix from Warning Manager.

AGR_FormulaBasedPricingHeader_AdditionalCalculationOutputTypesConfigurator

This is the Configurator logic for the Header that displays the Additional Calculation Output Types Result Matrix Configurator Table input.

Elements Description
  • InputGeneration - Initializes the Input Manager solution from AGR_InputsLib. Configuration for the manager read from: libs.AGR_ProcessingLib.ConstConfig.INPUT_GENERATION_CONFIG.ADDITIONAL_CALCULATION_OUTPUT_TYPES_CONFIGURATOR and generates the Configurator Entries

AGR_FormulaBasedPricingHeader_BoundsConfigurator

This is the Configurator logic for the Header that displays the Lower and Upper Bound inputs.

Elements Description
  • InputGeneration - Initializes the Input Manager solution from AGR_InputsLib. Configuration for the manager read from: libs.AGR_ProcessingLib.ConstConfig.INPUT_GENERATION_CONFIG.BOUNDS_CONFIGURATOR and generates the Configurator Entries

AGR_FormulaBasedPricingHeader_ForecastConfigurator

This is the Configurator logic for the Header that displays the Forecast Engine input as well as any inputs defined by the selected Forecast Engine.

Elements Description
  • InputGeneration - Initializes the Input Manager solution from AGR_InputsLib. Configuration for the manager read from: libs.AGR_ProcessingLib.ConstConfig.INPUT_GENERATION_CONFIG.FORECAST_CONFIGURATOR and generates the Configurator Entries

  • ForecastInputGeneration - Initializes the Input Manager solution from AGR_InputsLib. The Configuration for the manager is based on the selected Forecast Engine. If the Forecast Type has an Input Generation table, then it’s used for the initialization.

Recalculation Logics

AGR_ConditionRecordCreation

This is a Condition Record Creation Logic that reads the Condition Record output produced by the Line Item and creates a Condition Record out of it. It is run only in the Agreement Recalculation context via Scheduled Calculation.

Elements Description
  • AbortInputGeneration - Standard Abort Input Generation element.

  • CreateRecords - Reads the Condition Record output from the Line Item and creates Condition Records based on the provided structure.

AGR_AgreementFeeder

This is a Feeder logic for the Scheduled Calculation. It is used to provide the Calculation with Agreements that need calculation. They need to fulfill certain criteria to be picked up by the Feeder.

Elements Description
  • AbortInputGeneration - Standard Abort Input Generation element.

  • EmitAgreements - Gathers the Agreements that should be recalculated based on the set criteria and calls the emit function to pass them to the Calculation Object.

General Library Logics

AGR_DashboardsLib

This library logic stores utility functions that are used by the Dashboards present in the Agreements Package.

Elements Description
  • ConstConfig - Stores configuration constants related to Dashboards.

  • AgreementLineItemUtils - Stores some utility methods related to Agreement Line Items that are used in Dashboards for data processing/gathering.

AGR_ForecastEnginesLib

This library logic stores definitions of Forecast Engines that are used to calculation Forecast revenue in the Line Item calculation. The elements here should reflect the entries in AGR_ForecastTypes Company Parameter.

Elements Description
  • AGR_Forecast_Average - Defines the calculation method of the Average Forecast Engine.

  • AGR_Forecast_CostPlus - Defines the calculation method of the Cost Plus Forecast Engine.

AGR_FormulaLib

This library contains various utility functions that are used for management of anything Formula related, be it Formula Designer Formulas or Input Based Formulas. It also contains the Const Config for all Formula based operations.

Elements Description
  • ConstConfig - Stores Formula related configuration constants.

  • EngineCalculator - Proxy of SharedAccLib Engine Calculator, that is the backbone of all Calculation Engines.

  • FormulaUtils - Stores utility functions related to Formula Designer Custom Form Objects.

  • InputBasedFormulaUtils - Stores utility functions related Input Based Formula Custom Form Objects.

  • FormulaProcessingUtils - Stores utility functions that operate on both Input Based and Formula Designer Formulas, usually contains proper data extraction methods.

  • FormulaTypeUtils - Stores utility methods related to Formula Types.

AGR_InputBasedFormulaEnginesLib

This library stores definitions of Input Based Formulas Calculation Engines that are used to calculate the revenue in the Line Item calculation. The elements here should reflect the entries in AGR_InputBasedFormulaTypes Company Parameter.

Elements Description
  • AGR_Formula_CostPlus - Defines the calculation method of the Input-Based Cost Plus Formula Type.

AGR_ProcessingLib

Main library of the Package. Contains various utility methods, for almost everything else that is not in AGR_FormulaLib or AGR_DashboardsLib. Also stores the main Const Config of the solution.

Elements Description
  • ConstConfig - Stores Input related configuration constants.

  • ConfigManager - Contains the Config Manager solution that is used to read all Configuration Company Parameters. More on ConfigManager here <link>

  • WarningManager - Contains the Warning Manager solution that is used to handle all exceptions being thrown by the package. For more details on WarningManager, see the Error Management (Agreements) article.

  • AdvancedConfigurationUtils - Contains utility functions to read Advanced Configuration objects.

  • QueryUtils - Contains utility functions for Datamart Queries and related operations.

  • UOMUtils - Contains utility functions for Unit of Measure Data source operations

  • AgreementUtils - Contains utility functions for Agreement data handling, retrieval and modification.

  • AgreementLineItemUtils - Contains utility functions for Agreement Line Item data handling, retrieval and modification.

  • DateUtils - Stores various date related utility methods that are used in various places of the package.

  • MathUtils - Stores various math related utility methods that are used in various places of the package.

  • ScenarioUtils - Contains scenario related methods, for example reading of the Scenario input values generated by the Input Manager.

  • ForecastUtils - Contains forecast related functions that happen on the Agreement, such as calculation of change outputs or retrieval of forecast period range.

  • InputUtils - Contains utility functions for reading Header/Scenario Input values generated by the Input Manager.

  • MasterDataUtils - Contains utility functions for Master Data data handling.

  • ResultMatrixUtils - Contains utility functions for generation of Result Matrices, formatting and colors.

  • ConditionRecordSetUtils - Contains utility functions for Condition Record Set data fetching.

  • ConditionRecordUtils - Contains utility functions for Condition Record data handling, retrieval and modification.

AGR_InputLib

This logic stores the InputManager, which is the solution that handles most input generation present in the Package (Input Library Logics below are used by it). It also contains any common input generation functions/utilities.

Elements Description
  • ConstConfig - Stores Input related configuration constants.

  • InputManager - Stores the Input Manager solution together with its configuration.

  • CommonInputGenerationUtils - Stores common utility functions that are used during Input Generation function calls.

Input Library Logics

AGR_DashboardInputsLib

Input Generation library containing definitions for inputs used by package Dashboards. The elements in this library should reflect the entries from any Company Parameter that’s connected to Dashboard Input Generation.

Elements Description
  • AGR_Dashboard_ScenarioComparison - Contains generation functions for all inputs of the AGR_Dashboard_ScenarioComparison.

  • AGR_Dashboard_ScenarioComparison_Configurator - Contains generation functions for all inputs of the AGR_Dashboard_ScenarioComparison_Configurator.

AGR_ForecastInputsLib

Input Generation library containing definitions for inputs used by package Forecast Engines. The elements in this library should reflect the entries from any Company Parameter that’s connected to Forecast Input Generation.

Elements Description
  • AGR_Forecast_Average - Contains generation functions for all inputs of the AGR_Forecast_Average.

  • AGR_Forecast_CostPlus - Contains generation functions for all inputs of the AGR_Forecast_CostPlus.

AGR_FormulaInputsLib

Input Generation library containing definitions for inputs used by package Formulas. The elements in this library should reflect the entries from any Company Parameter that’s connected to Formula Input Generation.

Elements Description
  • AGR_Formula_CostPlus - Contains generation functions for all inputs of the AGR_Formula_CostPlus.

  • AGR_Formula_ExceptionsConfigurator - Contains generation functions for all inputs of the AGR_Formula_ExceptionsConfigurator.

  • AGR_FormulaHeaderAttributesConfigurator - Contains generation functions for all inputs of the AGR_FormulaHeaderAttributesConfigurator.

AGR_InputGeneratorLib

Input Generation library containing definitions for inputs used by package Forecast Engines. The elements in this library should reflect the entries from any Company Parameter that’s connected to Agreement Input Generation.

Elements Description
  • AGR_FormulaBasedPricingHeader - Contains generation functions for all inputs of the AGR_FormulaBasedPricingHeader.

  • AGR_FormulaBasedPricing - Contains generation functions for all inputs of the AGR_FormulaBasedPricing.

  • AGR_FormulaBasedPricing_FormulaConfigurator - Contains generation functions for all inputs of the AGR_FormulaBasedPricing_FormulaConfigurator.

  • AGR_FormulaBasedPricing_ProductConfigurator - Contains generation functions for all inputs of the AGR_FormulaBasedPricing_ProductConfigurator.

  • AGR_FormulaBasedPricingHeader_AdditionalCalculationOutputTypesConfigurator - Contains generation functions for all inputs of the AGR_FormulaBasedPricingHeader_AdditionalCalculationOutputTypesConfigurator.

  • AGR_FormulaBasedPricingHeader_ForecastConfigurator - Contains generation functions for all inputs of the AGR_FormulaBasedPricingHeader_ForecastConfigurator.

  • AGR_FormulaBasedPricingHeader_BoundsConfigurator - Contains generation functions for all inputs of the AGR_FormulaBasedPricingHeader_BoundsConfigurator.

Formula Designer Logics

AGR_FormulaDesigner_CustomBlocks

This logic contains the definitions of Function blocks for Formula Designer. This article describes both the structure and behavior of this logic <link>.

Elements Description
  • Meta - Defines the Function blocks to be displayed under Functions section of Formula Designer.

  • Functions - Stores the functions that are called by the Function blocks defined in Meta element.

AGR_FormulaDesigner_CustomInputs

This logic contains the definitions of Input blocks for Formula Designer. This article describes both the structure and behavior of this logic <link>.

Elements Description
  • Meta - Defines the Input blocks to be displayed under Inputs section of Formula Designer. Stores meta elements that are passed to AGR_FormulaDesigner_Deployment.

  • InputGenerationFunctions - Stores the generation functions for all inputs defined in the Meta element.

AGR_FormulaDesigner_Deployment

This logic defines the deployment process for Formula Designer - aka what happens after “Activate” button is pressed on a Formula Type.

Elements Description
  • Deploy - Handles the deployment of all Formula Type configuration and Inputs blocks. All information is passed via “magic” variable called “input”, which stores all information necessary to create new Company Parameters or adjust the current ones.

Formula Logics

AGR_FormulaHeader

This logic defines the Header behaviour (“Details” tab) on Formula CFO. It generates the Inputs for the Formula Type in the Definition Section and “descriptor” inputs in Attributes Section.

Elements Description
  • Inputs - Displays two configurators AGR_FormulaHeaderAttributesConfigurator and AGR_FormulaHeaderDefinitionConfigurator (which gets injected with the current CFO unique name)

AGR_FormulaHeaderAttributesConfigurator

This is Configurator logic for the Attributes Section of the Formula.

Elements Description
  • AttributesSectionInput - Displays the “description” of the Attributes section.

  • Inputs - Displays inputs defined in libs.AGR_FormulaLib.ConstConfig.INPUT_GENERATION_CONFIG.FORMULA_HEADER_ATTRIBUTES_CONFIGURATOR

AGR_FormulaHeaderDefinitionConfigurator

This is Configurator logic for the Definition Section of the Formula. It generates any Inputs that have been defined on the Formula Type.

Elements Description
  • CFOUniqueNameInput - Reads and stores the value passed by the AGR_FormulaHeader that contains the CFO UniqueName in which this configurator is displayed.

  • FormulaTypeName - Reads the Formula Type to CFO mapping stored in AGR_TypeToFormulaMapping Company Parameter, using the CFOUniqueNameInput value.

  • FormulaType - Retrieves the Formula Type configuration using FormulaTypeName.

  • ValidateInputsGeneration - Validates if the Formula Type is valid and if it has an Input Generation Table defined. Aborts calculation if the condition is not fulfilled.

  • DefinitionSectionInput - Displays the “description” of the Definition section.

  • Inputs - Generates the inputs defined by the Formula Type Input Generation table.

Input Based Formula Logics

AGR_InputBasedFormulaHeader

This is the Header logic for the Input Based Formula CFO. It generates the Formula Type selection and displays the Configurator that handles the Inputs defined by the selected Formula Type.

Elements Description
  • Inputs - Displays the Configurator defined by AGR_InputBasedFormulaHeaderConfigurator logic.

AGR_InputBasedFormulaHeaderConfigurator

This is the Configurator for the Header logic of Input Based Formula CFO. It generates the Inputs defined by the selected Formula Type.

Elements Description
  • FormulaType - Displays the “Formula Type” input (not controlled via Input Manager), defined in libs.AGR_FormulaLib.ConstConfig.INPUT_BASED_FORMULA_CONFIG.CONFIGURATOR.STATIC_INPUTS.FORMULA_TYPE

  • SelectedFormulaType - Reads the value from the FormulaType input

  • FormulaInputs - Initializes the appropriate InputManager instance based on the selection from FormulaType and retrieves the Configurator Entries. In other words this element displays the inputs defined in the Input Generation table bound to a specific Input-Based Formula Type.

AGR_Formula_ExceptionsConfigurator

This is the Configurator logic for the Product Exceptions Configurator Table for the Cost Plus Input Based Formula Type that is shipped together with the Package.

Elements Description
  • InputGeneration - Initializes the Input Manager solution from AGR_InputsLib. Configuration for the manager read from: libs.AGR_FormulaLib.ConstConfig.INPUT_GENERATION_CONFIG.EXCEPTIONS_CONFIGURATOR and generates the Configurator Entries

Dashboard Logics

AGR_DashboardScenarioComparison

This is the Dashboard logic for the Scenario Comparison Dashboard that is displayed as Tab on the Agreement. It contains the Comparison Result Matrix.

Elements Description
  • InputManager - Initializes the Input Manager solution from AGR_InputsLib. Configuration for the manager read from: libs.AGR_DashboardsLib.ConstConfig.INPUT_GENERATION_CONFIG.SCENARIO_COMPARISON

  • InputGeneration - Generates Inputs (just Configurator in this case) as defined by the Configuration.

  • AbortInputGeneration - Standard Abort Input Generation element.

  • ComparisonResultMatrix - Prepares the data and displays the Comparison Result Matrix portlet (if there is no Forecast Engine, displays the message instead).

AGR_DashboardScenarioComparison_Configurator

This is the Configurator logic for the Scenario Comparison Dashboard that displays the Scenario selection.

Elements Description
  • InputManager - Initializes the Input Manager solution from AGR_InputsLib. Configuration for the manager read from: libs.AGR_DashboardsLib.ConstConfig.INPUT_GENERATION_CONFIG.SCENARIO_COMPARISON_CONFIGURATOR

  • InputGeneration - Generates Configurator Entries as defined by the Configuration.

Filter Logics

AGR_FormulaBasedTypeFilter

This is the Filter Logic for the Agreement Line Items that filters out any non-Accelerator Condition Types.

Elements Description
  • TermTypeFilter - returns a Filter that is used by the “Add Item” on Agreement to provide only those Condition Types that are supported by the Accelerator. Those are listed in: SUPPORTED_CONDITION_TYPES in AGR_ProcessingLib/ConstConfig