Stages of Compensate and Pay
Let’s look at an example of how the stages of Compensate and Pay work together.
Terry Callahan is a Sales Representative for the East region. His territory has been defined as all sales that fall under the EAST category in the Postal Code hierarchy. As you can see from the diagram below, this includes the US states of New York (NY) and Pennsylvania (PA).
In the Classify stage, the Classifer ID is used to match each transaction with a region. Using the classification rule below the diagram, if the State field on the transaction matches NY or PA, the transaction will be classified, or associated with the East category.
Classification Rule: Postal Code.Classifer ID = Transaction.Billing.State
The Allocate stage has two jobs: allocate credits to payees, and aggregate those credits. The credit rule allocates credits, and the primary measurement rule aggregates them.
In January 2022, the following transactions in Terry’s region took place:
In the credit rule, we specified that any transaction classified as East would be allocated to Terry Callahan. Three credit records are created.
The primary measurement rule would simply aggregate these credits, creating a measurement with a value of $5250. Again, this measurement would be allocated to Terry.
The Reward stage processes the rest of the rules: Secondary Measurement, Incentive, and Deposit. Each of these rules creates output records with the results of their calculations, again, each allocated to Terry.
Let’s take a simple example in which Terry is paid a flat commission of 10% on all sales. This means he has earned a commission of $525 for the month.
At this point, you may be wondering what else has to happen. After all, we've completed all our calculations! This brings us to the last stage, which does not correspond to any plan rules.
The Pay stage is processed using internal calculations. Using the results of the deposit rules, it aggregates deposits for each payee and converts them into payments, and applies any outstanding balances from prior periods. Think of this as the stage that packages up each payee’s deposits and gets them ready for payroll.
Let’s say that the deposit rule we created to manage Terry’s payments has an Earning Group of Commission. If this is the only commission that he earned this month, then that’s the payment amount he will receive. However, let’s say it turns out he has a $200 balance from a prior period that has been on hold. In that case, the Pay stage applies that balance and generates a payment of $725.
At this point, this is only a Trial payment. This is because when Compensate and Pay is usually run multiple times in the period, so we are not ready to mark the amount as permanent. We will see how to post payments later in this topic.
Depending on the objective of the Pipeline run, some transactions may not require processing every time a Pipeline is run. Different processing modes may be selected, according to your needs.
Processing Mode Types:
- Process all transactions for all Positions (Full Mode)
- Process new and modified transactions & credits for all Positions (Incremental)
- Specific Position or Specific Position groups
Running the Pipeline to Calculate Results
When running a calculation, you will be prompted to select the calendar and period.
If processing units are enabled you will also select the processing unit.
If you choose to run calculations for multiple periods, you will be prompted to enter a start and end period. The calculations will be run in sequence.
The Pipeline can only run on the leaf-level, or most granular, period in the calendar. For example, if the calendar has months, quarters, and years, the Pipeline can only be run for the month.
Select the Task
The next prompt displays the tasks that the Pipeline can perform. To calculate compensation, select Run a compensation calculation for all sales deals.
Select the Stage to Run
The next step is to select which stages of the Pipeline to run. In the Pipeline Wizard, the Compensate and Pay sequence includes the stages Classify, Allocate, Reward, and Pay. While all of these stages are selected by default, you can also run them one at a time.
Additional Calculation Options
During a normal Compensate and Pay sequence, any results data that was generated from prior calculations for the current period are removed so the updated results can be generated. This is called a reset.
In some cases, you may need to reset data manually. If this is the case, here are few items to keep in mind.
- The reset process deletes, sets to zero, or nullifies results data
- Resets clean the database so that the specified Pipeline stages can populate the database with new data
- The reset processes are organized sequentially: earlier resets call later resets, but not the other way around
- When a reset is run, it resets data related to the specified period only
- Data entered manually, such as credits and deposits, aren't reset.
The order of stages is: Classify, Allocate, Reward, and Pay. Each stage can be reset.
Deferred Reset allows the system to retain data from the last Pipeline run. Instead of resetting the data, it instead marks it as invalid and flags it for deletion. To clean up data that is flagged for deletion, run the Reset process.
Run statistics reindexes the database after the Pipeline is run. This is checked by default.
Remove Stale Results allows you to remove old results or results without associated data from the pipeline report.
Selecting the Calculation Mode
You will next be prompted to select for whom you want to run the calculation and for which transactions.
Running a Calculation by Position Group
If you're using Position Groups, you can run any Calculation for only members of a single Position Group. This is convenient if different payees should be compensated on different schedules.
For example, let’s say your organization needs to pay its Sales Reps in the USA and Canada on the first day of the month, but in Europe on the tenth of the month. One option is to use Position Groups to organize your payees by country, run Post for Americas on the first, and run Post for Europe/EMEA on the tenth.
Log files are generated every time a Pipeline is run. In the Pipeline Wizard, you have several options to specify your logging preferences.
By default, Advanced Logging is disabled. This causes all log files to generate summary results.
Enable Advanced Logging creates more detailed log files, and allows you to select from several options.
- Performance Statistics enables you to receive advanced performance statistics and logging results.
- Verbose Logging gives you detailed calculation logging. This is a good option if you see errors after running the calculation. To reduce the size of verbose logs, Contextual Logging allows you to filter the verbose logging by position, participant, credit rule, or transaction.
- SQL Logging details the calculation breakdown and data and time details for rule evaluation.
Scheduling the Calculation
Running the Calculation from the user interface allows two options: Run Now and Schedule to run on the following time. While you can use other methods to schedule calculations to run on a regular schedule, the user interface only allows a one-time future run.