Logic Documentation (Sales Compensation)
See also the architecture documentation.
Core Logics
SC_Compensation
This is the core logic for the whole package. The logic works in four contexts:
Agreement context (line items) which as a result outputs a set of Compensation Records with some data prefilled.
Generate Compensation Record context which regenerates records if any of the main source data changed.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
SC_CompensationRecordCalculationFeeder
This is a feeder logic used for fetching and providing items for scheduled compensation calculation executions.
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.
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.
SC_AdjustmentWizard_Executor
This is an executor logic for Adjustment Configurator Wizard, it creates the Adjustment Custom Form Object.
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.
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.
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.
SC_Dashboard_SellerOverview_CompensationReferenceTable_PlanDetails_ContextLink
This is a logic for the Context Link part in Compensation Reference Table, for the button that leads to Plan Details.
SC_Dashboard_SellerOverview_CompensationReferenceTable_TransactionDetails_ContextLink
This is a logic for the Context Link part in Compensation Reference Table, for the button that leads to Transaction Details.
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.
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.
SC_Dashboard_AdminYTDSummary_PayoutsOverviewTable_PayoutDateDetails_ContextLink
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.
SC_Dashboard_AdminYTDSummary_PayoutsOverviewTable_PayoutSellerDetails_ContextLink
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.
SC_Dashboard_AdminYTDSummary_PayoutsOverviewTable_SellerYearlyOverview_ContextLink
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.
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.
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.
SC_Dashboard_PayoutsAndPlans_PayoutsTable_Details_ContextLink
This is a logic for the Context Link part in Payouts Table, for the button that leads to Payout Details on SC_TransactionsAndStatistics dashboard.
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.
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.
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.
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.
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.
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.
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.
SC_Compensation_RecordCalculationFeeder
This is a feeder logic used for fetching and providing items for scheduled compensation calculation executions.