Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel1
outlinefalse
typelist
printablefalse

(info) See also the architecture documentation.

Core Logics

SC_Compensation

This is the core logic for the whole package. The logic works in four contexts:

  1. Agreement context (line items) which as a result outputs a set of Compensation Records with some data prefilled.

  2. Generate Compensation Record context which regenerates records if any of the main source data changed.

  3. Generate Accrual Records context which constructs the snapshot of the current transaction data and stores them in Accrual Records to be used in calculations later on.

  4. Compensation Record which does the actual calculation that is run via the Sales Compensation Calculation object on a set schedule.

This logic – due to its size – has “context separators” which make it easier to see which elements run in which context. The separators are empty elements with the following name pattern: ___SOME_NAME_CONTEXT1_CONTEXT2___

  • SOME_NAME describes what is in the section.

  • CONTEXT1, CONTEXT2 define the contexts this section runs in.

Expand
titleElements Description
  • CompensationConfig – Initialization of a ConfigManager structure defined in SC_CompensationProcessingLib.

  • CompensationTypeCode – Retrieves the type name of the currently processed Compensation Line Item. This is the Name column value from ConditionTypes. This code is used to access the appropriate element from the CompensationTypesLib later on.

  • CalculationType – Defines the calculation type of a currently processed Compensation Type. Can be one of these values: Conditional, Growth, Stepped.

  • QuotaType – Defines the quota type of a currently processed Compensation Type. Can be one of these values: None, Single, Multi.

  • QuotaValueType – Defines the target value type of a currently processed Compensation Type. Can be one of these values: Amount, Percent.

  • CompensationValueType – Defines the compensation value type of a currently processed Compensation Type. Can be one of these values: Amount, Amount Per Unit, Percent, None.

  • DatamartCurrency – Defines the currency used by the main Datamart. The Datamart configuration is stored in SC_AdvancedConfiguration.

  • CustomerGroupInput – User input for Customer Group, used for filtering later on.

  • ProductGroupInput – User input for Product Group, used for filtering later on.

  • SingleQuotaInput – Returns a user input for a particular Compensation Type that has the quota defined as Single. Allows input of a quota factor.

  • SingleCompensationInput – Returns a user input for a particular Compensation Type that has the target defined as Single. Allows input of a compensation value.

  • TargetIncentiveInput – Returns a user input for a particular Compensation Type that has the calculation type defiend as Bonus. Allows input of a target incentive value.

  • VariablePayPercentageInput – Returns a user input for a particular Compensation Type that has the target defined as Variable Pay or Stepped Variable Pay. Allows input of a variable pay percentage value.

  • MultiQuotaInput – Returns a user input for a particular Compensation Type that has the quota defined as Multi and Calculation Type as one of Conditional, Growth or Stepped. Allows input of a combination of both quota factor and compensation value in a multitiered fashion.

  • MultiTargetBonusInput – Returns a user input for a particular Compensation Type that has the quota defined as Multi and Calculation Type as Bonus. Allows input of a combination of both quota factor and bonus payout rate factor in a multitiered fashion.

  • SteppedBonusInput – Returns a user input for a particular Compensation Type that has the quota defined as Multi and Calculation Type as Stepped Bonus or Stepped Variable Pay. Allows input of a combination of both quota factor and bonus payout rate factor in a multitiered fashion.

  • MultiTargetVariablePayInput – Returns a user input for a particular Compensation Type that has the quota defined as Multi and Calculation Type as Variable Pay. Allows input of a combination of both quota factor and variable pay in a multitiered fashion.

  • CompensationCapInput – If the Compensation Caps feature is turned on this input, it allows users to enter the cap value.

  • PaymentPeriodInput – Displays a used input for a Payment Period selection as an option. Available values are Monthly, Quarterly, Semi-Annually, Annually.

  • GeneralFilterInput – If the “general filter on line item” feature is turned on, this input displays and allows you to set the General filter on line item level.

  • QuotaForInput – Displays a read-only user input containing the QuotaFor value stored in Condition Types table. If the value is not present, the value from Advanced Configuration SC_AdvancedConfiguration is taken instead.

  • DepositSchemeInput – Displays a read-only user input containing the DepositScheme value stored in Condition Types table. If the value is not present, the value from Advanced Configuration SC_AdvancedConfiguration is taken instead.

  • BaselineFieldNameInput – Displays a read-only user input containing the BaselineFieldName value stored in Condition Types table. If the value is not present, the value from Advanced Configuration SC_AdvancedConfiguration is taken instead.

  • SyntaxCheckAbort

  • HeaderSellerGroupInput Retrieves the Seller group input value from the header level.

  • HeaderCurrencyInput Retrieves the currency value from the header level.

  • HeaderTypeInput Retrieves the type of the header.

  • ObjectValidation Performs validation of the state of a currently processed item in order to assess whether the logic execution should continue.

  • SellerIdsInput Returns the Seller group converted into a list of individual Seller IDs.

  • CompensationInputDefinition – Returns CompensationInputParameter that stores all the inputs taken from user/header etc. This parameter is used later on for other processing/access operations.

  • InputValidation – Performs validation on all inputs that were provided. If any input is marked as invalid, an exception is thrown with a proper message to the user.

  • PreviousPeriodAdjustmentData – Returns the previous period adjustment data used later on in calculations.

    CurrentPeriodAdjustmentData – Returns the current period adjustment data used later on in calculations.

  • PreviousPeriodData – Returns a value of the previous period compensation based on the current context.

  • CurrentPeriodData – Returns a value of the current period compensation based on the current context.

  • BaselineValueFieldLabel – Returns a field in a Datamart that will be used for baseline calculations. The field is defined in the Datamart Advanced Options configuration.

  • PreviousBaselineValue – Extracts the baseline value from the previous period data fetched in one of the previous elements.

  • CurrentBaselineValue – Extracts the baseline value from the current period data fetched in one of the previous elements.

  • PreviousCompensation – Extracts the compensation value from the previous period data fetched in one of the previous elements. It colors the result according to the value.

  • CurrentCompensation – Extracts the baseline value from the current period data fetched in one of the previous elements. It colors the result according to the value.

  • CompensationPayment – Extracts the Compensation Payment value (taking holdback into account). It colors the result according to the value.

  • IsForecastApplied – Returns the value defining whether the forecast method has been selected, therefore forecasts should be calculated.

  • ForecastMethod – Passes the value of the Forecast Method input.

  • SalesGoalIncreasePct Passes the value of Sales Goal Increase % input.

  • ForecastBaselineValue – Extracts the forecasted baseline value from the current period data fetched in one of the previous elements.

  • ForecastCompensation – Extracts the forecasted compensation value from the current period data fetched in one of the previous elements.

  • TrueUp – Forecast Compensation minus Current Compensation.

  • QuotaFor – Retrieves the quota for a value stored in the configuration of a currently processed Compensation Type of Advanced Configuration of the package (default). Can be either Payment Period or Plan Duration.

  • DepositScheme – Retrieves the deposit scheme value stored in the configuration of a currently processed Compensation Type of Advanced Configuration of the package (default). Can be either Cumulative or Non-Cumulative.

  • PaymentPeriod – Passes the value of the Payment Period input.

  • SellerNamesTable – Passes the value of the Seller input, stores the name of the Sellers.

  • CustomerGroup – Passes the value of the CustomerGroup input.

  • ProductGroup – Passes the value of the ProductGroup input.

  • GeneralFilter – Passes the value of the GeneralFilter input.

  • PayoutCurrency – Passes the value of the Payout Currency input.

  • CurrentPeriods – Returns a list of periods based on the line item payment period input and CO plan startDate/endDate.

  • PreviousPeriods – Returns a list of previous periods based on the line item payment period input and CO plan startDate/endDate.

  • PreviousCompensationDataOnPeriods – Returns data (adjustment data & Datamart data) of the previous periods. The period is based on the payment period input, used later on in calculations.

  • CurrentCompensationDataOnPeriods – Returns data (adjustment data & Datamart data) of the current periods. The period is based on the payment period input, used later on in calculations.

  • PreviousMonthlyPeriodsData – Returns data (adjustment data & Datamart data) of the previous monthly periods, used to aggregate data in the header.

  • CurrentMonthlyPeriodsData – Returns data (adjustment data & Datamart data) of the current monthly periods, used to aggregate data in the header.

  • AddingMonthlyPeriodsDataToCache – Adds previous monthly periods data and current monthly periods data to the cache, used to pass data to the header (post phase) for aggregation header data.

  • ForecastCompensationComparisonChart – Bar chart displaying Previous Compensation vs. Current Compensation vs. Forecasted Compensation.

  • ForecastBaselineValueTable – Table displaying this year’s sales forecast by Payment Period of the particular line item.

  • ForecastBaselineValueChart – Bar chart displaying this year’s sales forecast by Payment Period of the particular line item.

  • Holdback – Returns the holdback value that was taken into account during calculations.

  • PreviousPeriodAdjustmentIds – Returns the list of IDs of Adjustments that were taken into account during calculations. These Adjustments are taken from the previous period.

  • CurrentPeriodAdjustmentIds – Returns the list of IDs of Adjustments that were taken into account during calculations. These Adjustments are taken from the current period.

  • SourceCurrencyExchangeRate – Retrieves the currency exchange rate based on the selected Payout Currency and the Datamart Currency. The Exchange rate is based on the payout date of the record.

  • SourceCurrencyPreviousBaselineValue – Extracts the baseline value from the previous period data fetched in one of the previous elements, but in source currency.

  • SourceCurrencyCurrentBaselineValue – Extracts the baseline value from the current period data fetched in one of the previous elements, but in source currency.

  • SourceCurrencyPreviousCompensation – Extracts the compensation value from the previous period data fetched in one of the previous elements, but in source currency. It colors the result according to the value.

  • SourceCurrencyCompensationPayment – Extracts the Compensation Payment value (taking holdback into account), but in the source currency.

  • SourceCurrencyCurrentCompensation – Extracts the baseline value from the current period data fetched in one of the previous elements, but in source currency. It colors the result according to the value.

  • SourceCurrencyHoldback – Returns the holdback value that was taken into account during calculations, but in the source currency.

  • SourceCurrencyForecastBaselineValue – Extracts the forecasted baseline value from the current period data fetched in one of the previous elements, but in source currency.

  • SourceCurrencyForecastCompensation – Extracts the forecasted compensation value from the current period data fetched in one of the previous elements, but in source currency.

  • SourceCurrencyTrueUp – Forecast Compensation minus Current Compensation in source currency.

  • SourceCurrency – Defines the Source currency of the source data, the same as DatamartCurrency.

  • CompensationRecords – Generates the Compensation Record shells according to the processed information. This element is only run in the Plan context.

  • RegenerateCompensationRecords – Re-generates the Compensation Records if any of the re-generation conditions were met. This element is run only in the Generate Compensation Record context.

  • GenerateAccrualRecords – Generates the main calculation data snapshot in the Accrual Records table. This element is run only in the Generate Accrual Record context.

  • CalculationBase – Returns the calculationBase for the Compensation Record.

SC_CompensationHeader

This is currently the only header logic that defines the header behavior of Compensation Plan. The logic defines the inputs and outputs from the header and further operations that happen in the main core logic.

Expand
titleElements Description
  • ConfigManager – Initialization of a ConfigManager structure defined in SC_CompensationProcessingLib.

  • HeaderUtils – Contains methods for creating header inputs and outputs, main codebase of the logic. Calculation methods for Previous and Current compensation can also be found here.

  • SyntaxCheckAbort

  • HeaderInputs – Contains initialization of all header inputs using HeaderUtils (even the hidden ones, such as the type of the header).

  • HeaderOutputs – Adds outputs to the header using HeaderUtils.

SC_CompensationCap_Configurator

This is the configurator for the Compnesation Cap input on the line item level. It is used to display Compensation Cap inputs for the user: Compensation Cap and Cap For.

Expand
titleElements Description
  • QuotaForHiddenInput – Used to pass a Quota For value to the configurator in order to set the default value for the Cap For input.

  • CompensationCapInput – Creates a row layout input containing the Compensation Cap (Decimal) and Cap For (Option) inputs. If the Quota For input is set to Payment Period the Cap For becomes read-only.

SC_Forecast_Configurator

This is the configurator for the Forecast input on the header level. It is used to display forecast inputs for the user: Forecast Method and Sales Goal Increase Percent.

Expand
titleElements Description
  • ForecastMethod – Generates the Forecast Method options selection input that allows the user to provide forecast method.

  • SalesGoalIncreasePercent – Presents sales goal increase % value user input.

  • PreviousForecastMethod – Stores the old value of ForecastMethod. It is used to check the current value of ForecastMethod to reset value for SalesGoalIncreasePercent.

SC_CompensationHeaderSellerConfigurator

This is the configurator for Seller selection on the header level. It is used only in header types that contain a singular Seller. It displays additional information that is configured to be displayed in SC_HeaderSellerDetailsMapping Company Parameter table.

Expand
titleElements Description
  • SellerInput – Returns a user input that allows a Seller selection.

  • SellerDetailsInput – Returns a read-only user input that, based on selection in SellerInput, displays additional Seller information provided in the SC_HeaderSellerDetailsMapping Company Parameter table.

SC_QuotingPluginLib

This is a library that is used for integration with quoting solutions. It allows you to inject the Sales Compensation into the calculation results. The library also supports displaying the results in a pie chart or line score chart.

Expand
titleElements Description
  • ConstConfig ­– Contains definitions of global constant variables that are used throughout the logic. Any configuration-like constants should be stored here to avoid hard-coding and to allow for better maintainability of the solution

  • ConfigManager – Strictly defined structure that allows management of solution configuration. The benefit is that the whole configuration is contained within one “class”, it cannot be modified and is cached.

  • SalesCompensationEstimation – Stores methods used to calculate the estimated compensation based on items stored in a quote.

  • ChartUtils – Contains methods used to generate the charts supported by the solution.

Backend Logics

SC_CompensationDashboardsLib

This logic contains common utility functions that are used by the Sales Compensation package. The library focuses on dashboards and operations related to them – mostly data fetching and processing.

Expand
titleElements Description
  • ConstConfig – Contains definitions of global constant variables that are used throughout the logic. Any configuration-like constants should be stored here to avoid hard-coding and to allow for better maintainability of the solution.

  • ConfigurationUtils – Extension of the common element from SC_CompensationDashboardsLib, contains SC package specific configuration structures and loading operations. This is the place where all Advanced Configuration setup fetching and storage takes place.

  • CompensationTypeUtils – Contains methods related to fetching and accessing data from the Compensation Type object (COCT).

  • CompensationRecordUtils – Contains methods related to fetching and accessing data from the Compensation Record object (COR). This util also defines how the Compensation Record data are structured.

  • CompensationAgreementUtils – Contains methods related to fetching data from the Compensation Plan object (CO).

  • CompensationAgreementLineItemUtils – Defines methods for accessing and building the structures for Compensation Plan Line Items (“COLI” currently). The data is extracted from the already fetched and processed Compensation Plan objects.

  • ConfiguratorUtils – Contains methods used in various configurators for dashboards. These are mostly input generation methods.

  • DateUtils – Contains methods related to date in any way, such as filter generation for years or start/end dates.

  • InputUtils – Contains methods related to common user dashboard inputs.

  • InputValidationUtils – Contains methods used for input validation in dashboards – such as checking if input is not empty or has valid values.

  • FormatUtils – Contains methods used for formatting output values to appropriate money, percentage etc. formats. Currency symbol generation methods are also stored here.

  • PortletUtils – Contains methods that generate ready to use portlets, such as summary portlets.

  • QueryUtils – Contains methods related to any type of Datamart / Data Source lookups and queries.

  • CurrencyUtils – Contains methods related to currency (formats, fetching or label generation).

  • PaybackTypeUtils – Contains methods related to fetching and processing system data for various types of compensation types.

  • PaybackAgreementUtils – Contains everything related to compensation plans and also contains methods for generation of data structures as well as for fetching the data and displaying it.

  • UserUtils – Contains methods related to users, such as checking if a user belongs to a given user group.

  • SellerUtils – Contains methods related to Seller master data, such as filtering based on user groups.

  • ContextLinkUtils – Contains methods related to Context Link functionality present in the solution (e.g. forwarding from one dashboard to another).

SC_CompensationProcessingLib

This logic contains common utility functions that are used by the Sales Compensation package. The library focuses on data processing related to the core of this package – that means calculation of plans and records mostly.

Expand
titleElements Description
  • ConstConfig – Contains definitions of global constant variables that are used throughout the logic. Any configuration-like constants should be stored here to avoid hard-coding and to allow for better maintainability of the solution.

  • ConfigManager – Strictly defined structure that allows management of solution configuration. The benefit is that the whole configuration is contained within one “class”, it cannot be modified and is cached.

  • CompensationInputParameter – “Class” like element that provides a creation method for a structure called InputParameter which stores all user inputs for further processing or access.

  • InputUtils – Extension of SC_CompensationProcessingLib InputUtils element with Sales Compensation related methods. Contains mostly methods for creating inputs on the line item level.

  • InputValidationUtils – Extension of SC_CompensationProcessingLib InputValidationUtils, contains checks for Sales Compensation specific input types and their validation.

  • QueryUtils – Contains methods related to Datamart queries, mostly for transaction type data.

  • FormatUtils – Extension of SC_CompensationProcessingLib FormatUtils, extends the formatting by coloring options.

  • CalculationUtils – Contains methods for final steps of the core logic, creation of Compensation Records and enrichment of Compensation Record data based on the calculation base.

  • CacheDataManagementUtils – Contains methods for various caching purposes.

  • CompensationDataCalculator – Contains methods related to main calculations, that is for example calculation of the current and previous compensation in various contexts. Calculations related to transaction data can also be found here.

  • CompensationAgreementUtils – Contains methods that focus on Compensation Agreement objects as well as fetching and processing data coming from those objects.

  • CompensationPlanLineItemUtils – Contains methods that allow fetching the Plan line items.

  • CompensationRecordUtils – Contains methods that define a way of fetching the CompensationRecords as well as provide a way of building filters for the fetch based on the provided data.

  • ConditionTypeUtils – Contains methods that allow fetching the Condition Types.

  • CompensationAgreementUtils – Extension of SC_CompensationProcessingLib PaybackAgreementUtils with Sales Compensation related methods. The main addition is the focus on Compensation Agreement objects as well as fetching and processing data coming from those objects.

  • CompensationRecordUtils – Extension of SC_CompensationProcessingLib PaybackRecordUtils with Sales Compensation related methods. Defines a way of fetching the CompensationRecords as well as provides a way of building filters for the fetch based on the provided data.

  • BasicCompensationValuesDataUtils – Helper util element that supports compensation calculations, summaries etc.

  • CompensationCalculationParameter – “Class” like element that provides a creation method for a structure called CalculationParameter which stores all calculation related closures for further processing or access.

  • CompensationValueCalculator – Contains methods that describe the calculation methods for various types of compensations: target, stepped, growth or multi.

  • FilterUtils – Extension of SC_CompensationProcessingLib FilterUtils with Sales Compensation related methods. Mostly related to building a product/customer filter structure.

  • ReportUtils – Contains utils that are used in all reports in the package. This util includes data fetches for reports as well as generation of report specific labels.

  • SellerUtils – Contains methods that are used for all Seller related data manipulation – that is fetching, retrieval based on some specific fields etc.

  • AdjustmentUtils – Contains methods that are related to Adjustment Custom From, their creation, processing and access of data.

  • AdjustmentConfiguratorUtils – Contains methods used in Adjustment related configurators (Adjustment Form and Adjustment Creation Wizard) and mainly consists of input generation methods.

  • AdjustmentValidationUtils – Contains methods related to validation of Adjustment inputs.

  • CompensationTypeUtils – Contains methods related to CompensationTypes. Provides methods for easy access to all necessary information of a given CompensationType, as well as processing methods for its data such as reading Target or Compensation values from line items.

  • AccrualForecastUtils – Contains calculation methods related to Forecasts.

  • ChartUtils – Contains methods that generate charts. These charts are displayed in the outputs of the Compensation Plan, hence they have been separated from the SC_CompensationDashboardsLib.

  • DateUtils – Contains methods related mostly to date and period definition. Reuses and extends a lot of methods from SharedLib.

  • PeriodDataUtils – Related to DateUtils, this util handles the Period structure creation and data access to it.

  • MathUtils – Contains math related methods, such as percentage calculations.

SC_CompensationTypesLib

The library stores all types of currently supported Compensation Types that can be added as line items in Compensation Agreements. Each type has a strictly defined structure: Calculation Type, Target Type, Target Value Type, Compensation Value Type as well as a way to calculate the compensation. The element names match 1-1 the Condition Types defined in the system and should be carefully maintained if any changes arise.

Expand
titleElements List
  • SingleTargetAmount

  • SingleTargetPercent

  • MultiTargetAmount

  • MultiTargetPercent

  • SteppedAmount

  • SteppedPercent

  • GrowthAbsoluteAmount

  • GrowthAbsolutePercent

  • GrowthPercentAmount

  • GrowthPercentPercent

  • FlatBonus

  • MultiTargetBonus

  • SteppedBonus

  • VariablePayLinearAmount

  • VariablePayMultiTargetAmount

  • VariablePaySteppedAmount

  • ZeroQuotaPercent

  • RepetiviteQuotaAmount

SC_CompensationRecordCalculationFeeder

This is a feeder logic used for fetching and providing items for scheduled compensation calculation executions.

Expand
titleElements Description
  • SyntaxCheckAbort

  • EmittingCompensationRecord – Main element that emits the Compensation Records based on the provided filters.

Adjustments Logics

SC_AdjustmentHeader

This is a header logic for the Adjustment Custom Form object. It is used to read the properties of the object and pass them to the header configurator.

Expand
titleElements Description
  • Configurator – Initializes the header configurator in the customFormProcessor and passes appropriate parameters to it.

SC_AdjustmentHeader_Configurator

This is the main configurator logic for the Adjustment Custom Form object. It is displayed in the Query Details tab. It is used to generate adjustments based on user provided inputs.

Expand
titleElements Description
  • DatamartName Returns the Datamart name stored in Advanced Configuration.

  • SellerData Returns all Sellers (with labels) stored in the system.

  • AdjustmentFormId Retrieves the adjustment ID value passed from the header logic.

  • CreatedByInputReturns a read-only text input that displays the Created By value.

  • CreatedOnInputReturns a read-only text input that displays the Created On value.

  • TitleInput Returns a read-only text input that displays the Adjustment title.

  • StatusInputReturns a read-only text input that displays the current Adjustment status.

  • DescriptionInput Returns a text input that allows the user to insert a description for the Adjustment.

  • ProductGroupInput Returns a Product Group selection input used to filter out transactions affected by the Adjustment.

  • CustomerGroupInput – Returns a Customer Group selection input used to filter out transactions affected by the Adjustment.

  • SellerInput – Returns a Seller selection input used to filter out transactions affected by the Adjustment.

  • PaymentDateInput – Returns a Payment Date selection input used to filter out transactions affected by the Adjustment.

  • GeneralFilterInput – Returns a General Filter input used to filter out transactions affected by the Adjustment.

  • TransactionsDataMatrix Displays the transaction matrix that shows transactions that will be affected by the adjustment. The display limit is set to show top 10 transactions, the rest is hidden due to performance reasons.

  • AdjustmentTypeInput Returns an option input that allows the selection of the Adjustment type that will define how the adjustment will be generated and handled.

  • NewSellerInput In case of “Change Data” Adjustment type allows to insert a new Seller value for the selected transactions.

  • NewProductInput In case of “Change Data” Adjustment type allows to insert a new Product value for the selected transactions.

  • NewCustomerInput In case of “Change Data” Adjustment type allows to insert a new Customer value for the selected transactions.

  • NewDateInputIn case of “Change Data” Adjustment type allows to insert a new Pricing Date value for the selected transactions.

  • BaselineInputsInfo In case of “Change Data” Adjustment type displays some additional information for the user about baseline fields.

  • NewInvoicePriceInput – In case of “Change Data” Adjustment type allows to insert a new Invoice Price value for the selected transactions.

  • NewQuantityInput – In case of “Change Data” Adjustment type allows to insert a new Quantity value for the selected transactions.

  • NewGrossMarginInput – In case of “Change Data” Adjustment type allows to insert a new Gross Margin value for the selected transactions.

  • NewSellersCreditSplit – In case of “Split Credit” Adjustment type displays an Input Matrix that allows the user to define the Seller credit split. If the split percentage does not equal to 100%, an error message is shown.

  • DataTypeInput – Allows selection of either Manual or Transaction data type adjustment.

  • SelectedDataType – Reads the value selected in the DataTypeInput, used for conditionally hiding elements that are not valid for the given type.

  • ManualDataInfoInput – Read-only input that displays additional information to the user about the behaviour of the Manual type.

  • ManualDataMatrixInput – Displays the InputMatrix input that allows the user to enter the manual data to be used for Adjustments.

SC_AdjustmentWizard_Executor

This is an executor logic for Adjustment Configurator Wizard, it creates the Adjustment Custom Form Object.

Expand
titleElements Description
  • CreateAdjustmentCFO ­– Generates the adjustment object based on the provided inputs and stores the appropriate values in attributes.

  • SummaryScreen ­– Displays a summary message informing the user what happened after submission of the Adjustment.

SC_AdjustmentWizard_Inputs

This is an input logic for the Adjustment Configurator Wizard, used to display inputs of the Adjustment Custom Form for the user.

Expand
titleElements Description
  • SellerData ­– Returns all Sellers (with labels) stored in the system.

  • TitleInput ­– Generates the text input that allows the user to insert the title of the adjustment.

  • DescriptionInput – Generates the text input that allows the user to insert the description of the adjustment.

  • ProductGroupInput ­– Generates the Product Group input that allows the user to provide transactions for the Adjustment.

  • CustomerGroupInput ­– Generates the Customer Group input that allows the user to provide transactions for the Adjustment.

  • SellerInput ­– Generates the Seller options selection input that allows the user to provide transactions for the Adjustment.

  • PaymentDateInput ­– Generates the Date input that allows the user to provide transactions for the Adjustment.

  • GeneralFilterInput ­– Generates the General Filter input that allows the user to provide transactions for the Adjustment.

  • DataTypeInput – Allows selection of either Manual or Transaction data type adjustment.

  • SelectedDataType – Reads the value selected in the DataTypeInput, used for conditionally hiding elements that are not valid for the given type.

Output Logics

SC_Dashboard_SellerOverview

This is a logic for the Seller Overview dashboard. It handles display of all inputs, validation of the inputs, data fetching as well as processing of the obtained data. The dashboard displays three portlets: one data table and two charts.

Expand
titleElements Description
  • DashboardUtils – Contains all methods related to creation of portlets and data processing related to them. The utils are for all three currently visible portlets.

  • Configuration – Fetches the Advanced Configuration options for the package. The most important part for the dashboard is the Datamart configuration.

  • FeatureConfig – Fetches the FeatureConfig part of the solution that defines which optional features are turned on and off.

  • Configurator – Displays the inline configurator defined by SC_Dashboard_SellerOverview_Configurator logic.

  • AbortIfSyntaxCheck

  • InputValidation – Performs the validation of any entered inputs, currently the checks are if the Seller and Payout Year is selected.

  • SourceCurrencyCode – Retrieves the currency code of the Source Datamart defined in Configuration.

  • CompensationPlanData – Retrieves a complex data structure containing all the data necessary for the displayed portlets. The data is in raw format, each portlet processes the data as required.

  • YTDCompensationPlanTable – Prepares the data to be displayed in the summary Compensation Plan Table and builds the table itself. Adds necessary Context Linking. The table changes depending on the Holdback feature being enabled.

  • TotalCompensationPortlet – Prepares the data to be displayed in the Compensation Pie chart and builds the chart itself. The chart changes depending on the Holdback feature being enabled.

  • CompensationByMonthPortlet – Prepares the data to be displayed in the Compensation By Month column chart and builds the chart itself. The chart changes depending on the Holdback feature being enabled.

  • MixpanelTracking – Gathers information about the usage of the dashboard for Mixpanel.

SC_Dashboard_SellerOverview_Configurator

Default label: Seller Overview

This is the configurator logic for the Compensations Dashboard. Its main purpose is to allow selection of different Compensation Agreements based on the selected Seller.

Expand
titleElements Description
  • SellerInput – Presents the user with a Seller input if the user is a Sales Manager (allows to select one of the Sellers out of all who report to that person) or if the user is not a Sales Manager (a text with what Seller is being used for further processing).

  • CompensationInput – Provides a Compensation Agreement selection option based on the Seller input defined above. The agreements are fetched in YTD period and only approved ones are considered.

  • SellerInput – Presents the user with a Seller input if the user is a Sales Manager (allows to select one of the Sellers out of all who report to that person) or if the user is not a Sales Manager (a text with what Seller is being used for further processing).

  • ShouldAbortCalculation – Sets a hidden input that notifies the dashboard logic to abort generation of data (performance reasons).

  • AbortInputGeneration – Aborts further input generation in case the ShouldAbortCalculation flag is set.

  • CompensationPlanInput – Allows the selection of plans assigned to the seller selected in Seller Input.

  • PayoutCurrencyInput – Allows the selection of Payout Currency based on Seller and Plan selected previously.

  • YearInput – Allows the selection of Validity Year for plans based on Seller, Plan and Payout Currency selected previously.

This is a logic for the Context Link part in Compensation Reference Table, for the button that leads to Plan Details.

Expand
titleElements Description
  • ContextLink – The element reads the passed parameters and converts them to the target page data.

This is a logic for the Context Link part in Compensation Reference Table, for the button that leads to Transaction Details.

Expand
titleElements Description
  • ContextLink – The element reads the passed parameters and converts them to the target page data.

SC_Dashboard_AdminYTDSummary

This is a logic for the Admin YTD Summary dashboard. It handles display of all inputs, validation of the inputs, data fetching as well as processing of the obtained data. The dashboard displays two portlets: one summary and one table.

Expand
titleElements Description
  • DashboardUtils – Contains various methods that are used throughout the dashboard logic, for example safe extraction of input values.

  • FeatureConfig – Fetches the FeatureConfig part of the solution that defines which optional features are turned on and off.

  • Configuration – Fetches the Advanced Configuration options for the package. The most important part for the dashboard is the Datamart configuration.

  • Configurator – Displays the inline configurator defined by SC_Dashboard_AdminYTDSummary_Configurator logic.

  • SyntaxCheckAbort

  • InputValidation – Performs the validation of any entered inputs, currently it checks if the user has any SC User Groups assigned and if the calculation has not been aborted.

  • CompensationRecordsData – Retrieves a complex data structure containing all the data necessary for the displayed portlets. The data is in raw format, each portlet processes the data as required.

  • CompensationsYTDSummary – Processes the data and displays it in format of an HTML Summary portlet.

  • PayoutsOverviewTable – Processes the data and displays it in format of a Result Matrix table.

  • MixpanelTracking – Gathers information about the usage of the dashboard for Mixpanel.

SC_Dashboard_AdminYTDSummary_Configurator

This is the configurator logic for the Admin YTD Summary dashboard. Its main purpose is to allow filtering in the Dashboard, currently the supported inputs are: SellerGroup, Reporting Currency, Plan Currency.

Expand
titleElements Description
  • SellerGroupInput – Presents the user with a Seller input if the user is a Sales Manager (allows to select one of the Sellers out of all who report to that person) or if the user is not a Sales Manager (a text with what Seller is being used for further processing).

  • ShouldAbortCalculation – Sets a hidden input that notifies the dashboard logic to abort generation of data (performance reasons).

  • AbortInputGeneration – Aborts further input generation in case the ShouldAbortCalculation flag is set.

  • ReportingCurrencyInput – Displays the Reporting Currency radio button, based on whether the PlanCurrencyInput is shown or not.

  • PlanCurrencyInput – Displays the Plan Currency input if the Reporting Currency is set to Payout Currency. The available values are based on the previous selections.

This is a logic for the Context Link part in Payouts Overview Table, for the button that leads to Payout Date Details on SC_PayoutsAndPlans Dashboard.

Expand
titleElements Description
  • ContextLink – The element reads the passed parameters and converts them to the target page data.

This is a logic for the Context Link part in Payouts Overview Table, for the button that leads to Seller and Payout Date Details on SC_PayoutsAndPlans Dashboard.

Expand
titleElements Description
  • ContextLink – The element reads the passed parameters and converts them to the target page data.

This is a logic for the Context Link part in Payouts Overview Table, for the button that leads to Seller YTD Details on SC_SellerOverview Dashboard.

Expand
titleElements Description
  • ContextLink – The element reads the passed parameters and converts them to the target page data.

SC_Dashboard_PayoutsAndPlans

This is a logic for the Payout and Plans dashboard. It handles display of all inputs, validation of the inputs, data fetching as well as processing of the obtained data. The dashboard displays two portlets: one summary and two tables.

Expand
titleElements Description
  • DashboardUtils – Contains methods that are used to fetch data for the dashboard as well as process and prepare it for the use in portlets.

  • Configuration – Fetches the Advanced Configuration options for the package. The most important part for the dashboard is the Datamart configuration.

  • Configurator – Displays the inline configurator defined by SC_Dashboard_TransactionsAndStatistics_Configurator logic.

  • SyntaxCheckAbort

  • InputValidation – Performs the validation of any entered inputs, currently the checks are if the user has any of the SC groups assigned and if the Payout Date is selected.

  • SelectedSellers – Returns the value of the selected seller ids from the Configurator.

  • SelectedPayoutYear – Returns the value of the selected payout year from the Configurator.

  • SelectedPayoutDate – Returns the value of the selected payout date from the Configurator.

  • PayoutCurrency – Returns the currency in which the currently processed data is being payed out.

  • ActiveCompensationData – Returns the found Active Compensation Plans data based on the provided filters. To be used in ActiveCompensationsTable portlet.

  • ActiveCompensationsTable – Displays the Active Compensations Table Result Matrix portlet.

  • CompensationDetailsDashboard – Opens the SC_Embedded_Dashboard_Compensation_Detail dashboard which provides additional details related to the currently selected plan. This dashboard opens on click on a row in ActiveCompensationsTable portlet.

  • PayoutData – Returns the filtered data used by the dashboard, consideres Seller Ids, Payout Date and Payout Currency as main data filters. Uses Datamart configuration.

  • PayoutTable – Prepares the Result Matrix table that displays the Payouts.

  • TransactionDashboard – Currently not used.

  • PayoutSummary – Prepares the summary of the Payouts. Contains information about how many sellers are being processed, the number of compensation plans and number of payouts.

  • MixpanelTracking – Gathers information about the usage of the dashboard for Mixpanel.

SC_Dashboard_PayoutsAndPlans_Configurator

This is the configurator logic for the Payouts and Plans dashboard. Its main purpose is to allow filtering in the Dashboard, currently the supported inputs are: SellerGroup, Reporting Currency, Plan Currency, Payout Year and PayoutDate.

Expand
titleElements Description
  • ConfiguratorUtils – Contains methods that are used throughout the Configurator logs, for example to fetch common data or read inputs.

  • SellerGroupInput – Presents the user with a Seller input if the user is a Sales Manager (allows to select one of the Sellers out of all who report to that person) or if the user is not a Sales Manager (a text with what Seller is being used for further processing).

  • ShouldAbortCalculation – Sets a hidden input that notifies the dashboard logic to abort generation of data (performance reasons).

  • AbortInputGeneration – Aborts further input generation in case the ShouldAbortCalculation flag is set.

  • SellerIdsInput – Hidden input that translates the SellerGroup into a list of Seller IDs for further processing.

  • ReportingCurrencyInput – Displays the Reporting Currency radio button, based on whether the PlanCurrencyInput is shown or not.

  • PlanCurrencyInput – Displays the Plan Currency input if the Reporting Currency is set to Payout Currency. The available values are based on the previous selections.

  • PayoutYear – Displays the Payout Year input that allows to narrow down the displayed values into a given year. Values available based on previous selections.

  • PayoutDate – Displays the Payout Date input that allows to further narrow down the displayed values into a given date. Values available based on previous selections.

This is a logic for the Context Link part in Payouts Table, for the button that leads to Payout Details on SC_TransactionsAndStatistics dashboard.

Expand
titleElements Description
  • ContextLink – The element reads the passed parameters and converts them to the target page data.

SC_Dashboard_TransactionsAndStatistics

This is a logic for the Transactions and Statistics dashboard. It handles display of all inputs, validation of the inputs, data fetching as well as processing of the obtained data. The dashboard displays three portlets: one summary and two tables.

Expand
titleElements Description
  • Configuration – Fetches the Advanced Configuration options for the package. The most important part for the dashboard is the Datamart configuration.

  • ConfiguratorUtils – Contains methods that are used to fetch data from the dashboard input configurator.

  • CompensationAgreementDataUtils – Contains methods that are used for processing of data related to Compensation Plan, such as finding plans with appropriate filters.

  • TransactionUtils – Contains methods related to transaction data, queries and processing. This is the element where the query generation happens.

  • DataTableUtils – Contains methods related to ResultMatrix and the cell management, such as creating link cells.

  • Configurator – Displays the inline configurator defined by SC_Dashboard_TransactionsAndStatistics_Configurator logic.

  • SyntaxCheckAbort

  • CalculationAbort – Safety element that prevents calculation of any other elements when certain conditions are fulfilled. The purpose is to prevent loading a dashboard with a lot of data.

  • SourceCurrency – Returns the Datamart currency for the Datamart defined in Advanced Configuration.

  • CompensationPlanStatistics – Displays an HTML portlet that provides the summary of the data displayed on the dashboard, such as Number of Transactions or Sellers.

  • TransactionsTable – Displays a ResultMatrix table portlet that contains the list of transactions that are matching the provided filters.

  • CompensationRecordsTable – Displays a ResultMatrix table portlet that contains the list of Compensation Records that are matching the provided filters.

  • MixpanelTracking – Gathers information about the usage of the dashboard for Mixpanel.

SC_Dashboard_TransactionsAndStatistics_Configurator

This is the configurator logic for the Transactions and Statistics dashboard. Its main purpose is to allow filtering the transaction list present in the Dashboard, currently the supported inputs are: SellerGroup, Plan Currency, Compensation Plan Type, Compensation Plan Status, Compensation Plan, Compensation Record, Start Date, End Date.

Expand
titleElements Description
  • ConfiguratorCommonUtils – Provides util methods to read values from configurator entries or create them.

  • WarningElement – Dummy element returning an empty ConfiguratorEntry, used to set warning messsages in case of no provided inputs.

  • IsInitialRenderElement – Creates a Hidden entry that defines whether this or any other configurator refresh is initial.

  • IsInitialRenderValue – Reads the value that states whether this pass is an initial render, used to set up default values.

  • SellerGroupInput – Generates the Seller Group picker input. The input is read only for Sales Agents.

  • ShouldAbortCalculation – Creates a Hidden entry that is used to pass information to dashboard logic whether the calculation of the dashboard should be aborted.

  • AbortInputGeneration – Aborts the generation of inputs if the condition to display them is not fulfilled.

  • PlanCurrencyInput – Generates the Plan Payout Currency option input. This input is influenced by all inputs above.

  • CompensationPlanTypeInput – Generates the Plan Type options input. This input is influenced by all inputs above.

  • CompensationPlanStatusInput – Generates the Plan Status options input. This input is influenced by all inputs above.

  • CompensationPlanInput – Generates the Plan Unique Name options input. This input is influenced by all inputs above.

  • CompensationRecordInput – Generates the Compensation Record Unique Name options input. This input is influenced by all inputs above.

  • StartDateInput – Generates the Start Date date entry input.

  • EndDateInput – Generates the End Date date entry input.

  • HiddenWarningInputCheck – Checks if any of the inputs is populated and if not, sets the warning message on the dummy WarningElement result.

  • IsInitialRenderSetElement – Sets the value of IsInitialRenderElement to true after all the initial configurator render passes finished.

SC_Embedded_Dashboard_Compensation_Detail

This is a logic for the embedded dashboard that is used in Payouts and Plans Dashboard. The dashboard displays additional information about any selected plan.

Expand
titleElements Description
  • ConfigManager – Returns the instance of ConfigManager, which is a structure containing various configuration related information.

  • DashboardUtils – Contains methods that are used to fetch and process all the data required by the dashboard.

  • AbortSyntaxCheck

  • CompensationDetailTable – Displays the details table based on the plan that has been selected in the Payouts and Plans Dashboard.

Filter Logics

SC_DefaultConditionTypeFilter

This logic is used to limit the visibility of Condition Types during plan selection. It returns all Condition Types that are related to the Sales Compensation package. This logic should be set as default filtering when Sales Compensation Accelerator is in active use on the partition.

Expand
titleElements Description
  • SalesCompensationFilter – Returns a filter that filters out all Condition Types that are applicable for either Individual or Group Header Types.

SC_NoConditionTypeFilter

This is a filtering logic for the Default Header type present on the partition. It is created so the Default type does not display any SC related Condition Types during item selection.

Expand
titleElements Description
  • SalesCompensationFilter – Returns a filter that filters out all Condition Types that use SC_Compensation formula.

SC_SellerInputFilter

Filter logic used in various Seller Pickers to limit the visibility of the selection based on the available data and user permissions.

SC_SPIFFConditionTypeFilter

This is a filtering logic for the SPIFF Header type. It is created so the SPIFF type does not display any non-SPIFF related Condition Types during item selection.

Expand
titleElements Description
  • SPIFFTypesFilter – Returns a filter that filters out all Condition Types that are applicable for SPIFFs.

Other Logics

SC_HoldBack_Configurator

This is the configurator for the Holdback input on the header level. It is used to display holdback inputs for the user that allow to select a holdback value and type.

Expand
titleElements Description
  • HoldbackInputs – Displays two inputs that allow the user to set the holdback value and holdback type.

SC_Compensation_RecordCalculationFeeder

This is a feeder logic used for fetching and providing items for scheduled compensation calculation executions.

Expand
titleElements Description
  • SyntaxCheckAbort

  • EmittingCompensationRecord – Main element that emits the Compensation Records based on the provided filters.