Chapter 4 of 5Page 7 of 7

Pay commission

Power BI and API

Connect Power BI to the three commission analytics feeds, and read commission entries, earning lines, settlements and assignments through the API pages.

updated: applies-to: 2.0.0.0

Bitta Commission publishes three analytics feeds (commissionEarnings, commissionLedgerSummaries, commissionPayouts) for Power BI and five API pages for other tools.

Three analytics feeds and five API pages read commission data.

Bitta Commission publishes its commission data through Business Central APIs. Use the analytics feeds for Power BI, and the API pages to connect other systems.

Who can read the data

Sign in with a Business Central user who has the Commission - View permission set (BAA COMMISSION VIEW), or Commission - Sales or Commission - Admin. Each of them can read the feeds and the API pages.

To show salesperson names next to the codes, the user also needs read access to salespeople in Business Central, for example through the standard read permission sets of the base application.

Analytics feeds for Power BI

Three read-only feeds are published under api/bitta/commissionAnalytics/v1.0. Each feed returns summed rows, not every entry, so a refresh stays small. They read from a read-only copy of the database, so they never slow down posting.

Feed One row per Amounts
commissionEarnings Salesperson, plan, customer, item, line type, currency and posting date Quantity, line amount, base amount, cost amount and commission amount (LCY). Reversed earning lines are left out.
commissionLedgerSummaries Salesperson, entry type, global dimensions 1 and 2, currency and posting date Earned, payable and paid amounts (LCY). Unpaid is payable minus paid.
commissionPayouts Settlement, salesperson, vendor, payout method and currency Amount (LCY), with the settlement status and whether the line is paid or reversed.

Connect from Power BI Desktop

  1. Find your company ID in the standard API: .../api/v2.0/companies.
  2. In Power BI Desktop, choose Get data, then OData feed, and enter: https://api.businesscentral.dynamics.com/v2.0/<tenant ID>/<environment>/api/bitta/commissionAnalytics/v1.0/companies(<company ID>)/
  3. Sign in with Organizational account.
  4. Select commissionEarnings, commissionLedgerSummaries and commissionPayouts.

To keep refreshes small, filter by date, for example ?$filter=postingDate ge 2026-01-01.

A Power BI report template built on these three feeds is available on request. Ask for it on the contact page.

API pages

Five entities are published under api/bitta/commission/v1.0:

Entity What it holds Access
commissionLedgerEntries Commission ledger entries, with earned, payable and paid amounts Read only
commissionEarningLines How each entry was calculated: base, cost, margin, rate and rate source Read only
commissionSettlements Settlement headers Read only
commissionSettlementLines Settlement lines per salesperson Read only
commissionAssignments Plan assignments to salespeople, teams or all salespeople Read and write

The URL is: https://api.businesscentral.dynamics.com/v2.0/<tenant ID>/<environment>/api/bitta/commission/v1.0/companies(<company ID>)/<entity>

Each record has an id field, and field names are in camelCase, such as salespersonCode and postingDate. Nothing is posted, settled or released through the API. commissionAssignments is the only entity you can write to, for example so an HR system can give a new salesperson a plan. The same checks run as when you add the assignment in Business Central. Writing needs the Commission - Admin permission set.

// next step

Ready to try Bitta Commission?