/
Process of Manual Compensation Plan Recalculation

Process of Manual Compensation Plan Recalculation

Since version 9.0

On the Compensation Plan detail page, there are two buttons to recalculate the document. The difference is in how many lines are calculated.

  • Recalculate – Recalculates all line items.

  • Recalculate Changes – Recalculates only the line items which have changed compared to the previously calculated version. (Note that the button is in the line item’s panel with input parameters.)

A change of a line is, for example:

  • Change of item’s input field

  • Change of item’s label

  • Change of item’s result override

  • Change of header input field

A line item has the field dirty which is set by the system to true for each line which should be recalculated.

  • So for "full" recalculation, all items will be marked dirty.

  • For Recalculate Changes, only lines with some changes

If you want, you can read the value of the item’s dirty field in the header logic’s post-phase, and do only processing of the recalculated items.

compensation recalculation.drawio

The process involves the following actions:

  1. The system executes the header logic in pre-phase mode. Such code can create input fields on the header and modify the structure of the document (e.g. create/delete/update line items and folder).

  2. For every item:

    1. The system executes the compensation logic (only elements from the group compensation) in the standard mode. This logic will calculate and provide the results.

    2. The system will store those results to the line item.

  3. The system executes the header logic again, but in the post-phase mode. Such code can calculate summarized results of the whole document and store the results to the header (or to line items).

Related content

Process of Adding New Item to a Compensation Plan
Process of Adding New Item to a Compensation Plan
More like this
Process of Scheduled Plan Calculation Task
Process of Scheduled Plan Calculation Task
More like this
Process of Manual Rebate Agreement Recalculation
Process of Manual Rebate Agreement Recalculation
More like this
Sales Compensation Calculation Logic
Sales Compensation Calculation Logic
More like this
Process of Scheduled Record Calculation Task
Process of Scheduled Record Calculation Task
Read with this

Found an issue in documentation? Write to us.