Daily use
Calculate commission
Calculate commission in Business Central for one document or a whole period, test the numbers with a trial run that writes no ledger, and schedule daily runs.
updated: applies-to: 1.2.0.0
A calculation run turns accepted source facts into credits and earnings under a published plan version for one commission period. In Bitta Commission you can calculate a single document, run a batch over a whole period, test the numbers first with a trial run that writes no ledger, and schedule incremental batches through the job queue.
Before you start
- You need the Bitta Commission Processor permission set to prepare and calculate runs. Bitta Commission Processor and Bitta Commission Setup Administrator can both draft batch and trial runs and maintain run schedules.
- The source facts must be accepted. See Capture posted sales.
- The plan version must be published or active and effective on the source posting date. See Commission plans.
- The period must accept calculation: Open, Reopened, Calculating, Review or Approved. A Future period is refused until its start date is reached, and the business date of the fact must fall inside the period. For a single document, the Prepare Commission Calculation dialog accepts Open, Calculating, Review or Approved; calculate a Reopened period with a batch run. See Commission periods.
Choose the kind of run
| Run | Use it when | Writes ledgers |
|---|---|---|
| Single calculation run | You calculate or recheck one invoice or one linked credit memo. | Yes |
| Batch run, Full | You calculate every accepted fact of the period that is not yet calculated for the plan. | Yes |
| Batch run, Incremental | You calculate only facts accepted since the last baseline watermark. | Yes |
| Trial run | You want to see the numbers first. | No |
| Run schedule | You want incremental batches to start every day. | Yes |
Calculate one document
- Open Commission Calculation Runs and choose Prepare Calculation, or choose Prepare Calculation on a line in Commission Source Facts. On Prepare Commission Calculation, fill in Source Entry No., Plan Code, Version No. and Period Code.
- Choose OK. The run is prepared and validated. A missing or duplicate plan or period code is refused before the run is created.
- Select the run and choose Calculate or Resume. Completed means the run finished cleanly; Completed with Exceptions means some items raised exceptions.
- Choose Earnings to see the earnings the run produced.
For a linked credit memo, choose Preview and Calculate Return instead. You review the projected signed return delta without financial writes and then confirm it. See Commission returns.
Run Stages shows each stage with its status, counts, checkpoint and hashes; if processing stops, Calculate or Resume reuses the completed stages. Cancel Run asks for a Cancellation Reason Code and keeps existing financial evidence.
Run a batch for a period
- Open Commission Batch Runs and create a new batch.
- On Commission Batch Run, fill in the Scope group:
| Field | What it does |
|---|---|
| Mode | Full or Incremental. An incremental batch needs a completed full baseline for the plan version and period. |
| Period Code, Plan Code | The period and plan to calculate. |
| Plan Version No. | Leave zero to use the latest published or active version. |
| Participant No. | Optional. Only facts of the participant's linked salespeople are selected, and the batch does not set a baseline. |
| Source Entry No. Filter | Optional single source fact. |
| Trace Level | Errors, Summary or Detail for the run log. |
| Max Facts Per Invocation, Max Duration (Seconds) | How much one invocation processes before the batch suspends and resumes later. |
- Choose Start. The batch freezes its scope, captures the source watermark, selects the facts and processes the first invocation, calculating each fact as its own child run in source entry order.
- If the status is Suspended, choose Continue. Review the Source Facts part: each fact is Pending, Processing, Completed, Completed with Exceptions, Review Required, Skipped or Failed, with its Last Error Text. Choose Retry Failed Items to queue failed and review-required facts again, or Skip for a fact that is not commissionable under this plan.
- Choose Reconcile Control Totals. The batch recomputes its totals from the child run ledgers and stage checkpoints and sets Reconciled when they agree; otherwise Reconciliation Difference shows the gap.
TIP
A fact in Review Required is a linked return. Choose Calculation Run on the fact and use Preview and Calculate Return.
Cancel stops the batch between facts; child runs that already finished keep their ledgers. Baselines and Watermarks on Commission Batch Runs shows, per plan version and period, the highest source entry number covered without gaps.
Run Period Pipeline runs the remaining period stages of the batch in order: collect, calculate, roll-up, settle, post, finalize and export. Run Next Pipeline Stage runs one stage. Settle, post, finalize and export require the finance-all security scope. See Close a period.
Test the numbers with a trial run
- Open Commission Trial Runs and create a trial.
- Fill in Period Code and Plan Code, and optionally Plan Version No., Participant No. or Source Entry No. Filter.
- Choose Calculate Trial. Credit, measure, attainment and earning arithmetic is calculated without writing any ledger, and earlier trial results are replaced. Each Trial Results line shows the participant, component, model, credit, entitlement before and after, the earning delta and an Explanation.
- Choose Promote to Posted Run and confirm. A normal full batch run starts over the same scope and writes immutable ledger entries.
- Choose Refresh Posted Comparison. Promotion Difference shows the posted earning total minus the trial total.
NOTE
Trials skip facts such as linked returns or facts whose credit cannot be resolved; they are counted in Skipped Fact Count. Lines with Modeled off use a model the trial does not calculate, and the posted run calculates them.
Schedule incremental runs
When you choose Finish in the guided setup, the wizard creates a schedule for the plan it publishes: code WIZ- followed by the plan code, described as the daily commission run for the plan, on the commission calendar you chose, with Run Time 2:00 AM. The schedule is enabled, and the resume job that continues unfinished batches is created. If an enabled schedule already exists for the plan, the wizard keeps it. See Run the guided setup.
NOTE
The wizard leaves Create Baseline If Missing off. A scheduled run skips a period that has no full baseline yet, and Last Result says the period has no full baseline. Run a full batch for the period first, or turn on Create Baseline If Missing on the schedule.
To add a schedule yourself:
- Open Commission Run Schedules and add a schedule with a Code, Plan Code, Run Time and, optionally, Calendar Code, Plan Version No. and Participant No.
- Set Create Baseline If Missing to run a full batch for a period without a baseline instead of skipping it, and Include Reopened Periods for reopened periods whose reopen chose the scheduled incremental delta policy.
- Choose Enable to create the daily job queue entry, or Run Now to start the batches immediately. Last Run At, Last Batch No. and Last Result show the outcome.
Batch defaults, such as Max Facts Per Invocation (ceiling 10,000) and Reconciliation Tolerance, live on Commission Run Operations Setup, where Create Resume Job creates the recurring job queue entry that continues unfinished batches. See Job queue monitoring.
Recalculation queue
Approved correction requests queue items on Commission Recalculation Queue. Each item becomes exactly one correction run; a failed item can be retried with Retry or cancelled with Cancel Item before it posts. See Commission returns.
Troubleshooting
- The batch does not start. An incremental batch without a full baseline, a plan version that is not published or active, a period that is not open or reopened, or a second active batch for the same plan version and period is refused with a BAA-RUN-BATCH error that names the cause.
- Why did a fact fail? Read Last Error Text on the fact, then Run Log. Raised exceptions appear on Commission Exceptions; see Exception handling.
For the role center tiles that show run status, see Commission reports.
What's next
Find out why an earning has its amount: Explain any earning.