Your Sales Team Promised a Business Central Payroll Integration: Posting Payroll Journals With Dimensions
A technical guide for payroll software vendors whose developers are booked: general journal lines through the Business Central API or a small AL extension, cost centres mapped to dimensions, reversals, an interim file import, and a connector your team can take over.
A payroll product integrates with Business Central by posting each pay run as general journal lines, never by writing ledger entries. Two designs work: the standard API v2.0 journals and journalLines endpoints with dimensionSetLines and the post action, or a small AL extension with a custom API that takes a whole pay run in one call. Either way, cost centres map to Business Central dimensions and are validated before anything posts, and every run carries an ID so it can be reversed or resent without duplicates. An interim file import into a general journal lets promised customers go live now. Solzet builds the connector as your external AL team and hands it over to your developers.
What does a payroll integration with Business Central actually have to post?
A balanced accounting summary of each pay run, not the payslips. The payroll product keeps the employee-level calculation and the personal data; Business Central needs the expense, the liabilities and the settlement, split by the dimensions finance reports on. A typical pay run becomes a set of journal lines that debit gross pay and employer costs by cost centre and credit the liabilities: net pay to be paid, income tax and social security withheld, pension and other deductions, and employer contributions. Some customers want net pay per employee on the employee ledger so the payment journal can pay each person; others want one net pay line settled by a single bank transfer from payroll.
The mapping from payroll elements to general ledger accounts differs per customer, so it is data, not code: a mapping table per Business Central company, maintained by the customer's finance team, that says which element posts to which account and which dimensions it carries.
| Payroll element | Business Central line | Dimensions |
|---|---|---|
| Gross salary, overtime, bonuses | Debit expense G/L accounts | Cost centre, department, project where used |
| Employer social security and pension | Debit expense, credit liability G/L accounts | Cost centre on the expense side |
| Income tax and employee social security withheld | Credit liability G/L accounts | Usually none |
| Other deductions (pension, benefits, attachments) | Credit liability G/L accounts | Usually none |
| Net pay | Credit a net pay liability account, or employee accounts per person | None, or employee where paid per person |
Should the connector use the standard API or a small AL extension?
Both work, and the choice depends on how many customers you will connect and how much validation you want inside Business Central. The standard journal API exposes general journal batches with their journalLines, each line can carry dimensionSetLines, and a bound action, Microsoft.NAV.post, posts the batch. It needs no installation in the customer's tenant, which makes it attractive for a first customer. The cost is chattiness and late validation: one call per line and further calls per dimension, errors that appear only at posting, and the connector doing all the checking from outside.
A small AL extension adds a custom API page under your own publisher, group and version that accepts a whole pay run as one payload, writes it to a staging table, validates every line against the mapping and Business Central's own rules, creates the journal in one transaction and returns a clear error list if anything fails. For a payroll product that will be connected to many Business Central customers, this is the design we recommend, and it is the natural shape for a Microsoft Marketplace (AppSource) app.
| Aspect | Standard API v2.0 journals | AL extension with a custom API |
|---|---|---|
| Install in customer tenant | Nothing to install | Extension installed per tenant, or from Microsoft Marketplace |
| Calls per pay run | One per line, plus dimension calls, plus post | One payload, plus an optional post |
| Validation | In your connector; Business Central errors surface at posting | Before the journal is created, with an error list per line |
| Mapping table | Held in the payroll product | Held in Business Central, maintained by the customer finance team |
| Duplicate protection | Built in your connector | Pay run ID checked inside Business Central |
| Best for | A first customer or a pilot | A product connected to many Business Central customers |
How do cost centres map to dimensions with validation before posting?
Payroll cost centres rarely match Business Central dimension values one to one, so the mapping table translates them, and validation proves the translation before a single line is posted. In Business Central, dimensions are codes such as DEPARTMENT or COSTCENTRE with values, and accounts can carry default dimension rules: Code Mandatory, Same Code or No Code, with blocked values and dimension combinations on top. A journal that breaks any of these fails at posting, which for a pay run means a half-checked batch and an unhappy payroll administrator.
The extension checks everything first and rejects the run as a whole if anything is wrong, so finance never sees a partial pay run. How the dimensions themselves should be designed, and why departments belong in dimensions rather than in account numbers, is on designing the chart of accounts and dimensions.
- Every payroll element maps to an existing G/L account that allows direct posting.
- Every cost centre maps to an existing, unblocked dimension value.
- Default dimension rules and dimension combinations are satisfied for every line.
- The posting date falls inside the allowed posting period for the integration user.
- Each document number balances to zero, and the run total matches the payroll control total.
- The pay run ID has not already been imported or posted.
How are reversals, corrections and resends handled?
With one rule: every pay run has a unique ID that travels with it, in the document number or external document number on every line and in the staging table. A resend of the same run is recognised and refused, so a network timeout never posts payroll twice. A correction is a new run with its own ID: either a difference run that posts only the changes, or a full reversal followed by the corrected run, depending on what the payroll product produces and what finance prefers to see in the ledger.
Business Central can reverse general journal postings with Reverse Register or Reverse Transaction, and finance may use that for an obvious mistake. For the integration, a reversal that comes from payroll is better, because the payroll product and the ledger then tell the same story. Off-cycle runs, such as a leaver paid mid-month, are simply runs with their own ID and posting date.
How do promised customers go live before the connector is finished?
With an interim file import that uses the same mapping the connector will use. The payroll product exports each pay run in an agreed layout, already translated to G/L accounts and dimension values, and the customer's finance team brings it into a general journal, reviews it and posts it. Business Central offers several routes, so pick the one that suits the customer's skills and check the current Microsoft Learn documentation for your version: Edit in Excel on the general journal page, which publishes the lines back to the journal; a configuration package for journal lines; or a small XMLport that reads your file layout directly, which is a small piece of AL work rather than a project.
Two details make the interim route worth doing. Design the file layout as the future API payload, so the mapping work customers do now carries straight into the connector. And keep the pay run ID in the file, so the duplicate check exists from day one. Customers go live on time, finance sees the journal before posting, and the move to the connector later is a change of transport, not of accounting.
How should the extension be built so your developers can take it over?
As your product from the first commit. The code lives in your source control, under your publisher name, your app ID range and your object prefix, with automated tests in AL test codeunits, a build pipeline that compiles and tests every change, and documentation of the payload, the mapping table and every validation rule. Your developers review pull requests from the start, so by the end they have read every line. The handover is a set of working sessions on the code, the pipeline and the release process, followed by a period in which we review their first changes.
If you want the connector in Microsoft Marketplace (AppSource), it is built for that from the start: naming, permissions, upgrade code and the technical validation rules. The checklist for getting through validation is on Business Central AppSource validation, and how we build and publish apps is on Business Central AL development. You remain the publisher; Solzet builds and prepares the app.
What does authentication and a multi-customer rollout look like?
Service to service, with no stored passwords. Your product uses a Microsoft Entra app registration with Business Central API permissions; each customer's administrator grants consent and adds the app on the Microsoft Entra Applications page in Business Central with a permission set that allows only the payroll journal objects. The connector stores per customer the tenant, environment and company, plus the journal batch to use. Business Central online applies rate limits per user and environment, which matters when several customers post at the same time on payday; the limits and how to handle 429 responses are explained on Business Central OData timeouts and 429 errors. Add monitoring from the start: every run logged with its ID, status and errors, and an alert when a run fails validation, so your support team sees problems before the customer's finance team does.
What does Solzet deliver for a payroll vendor that needs a Business Central connector?
Solzet acts as your external AL team for as long as you need one. We agree the payload and the mapping model with your product and payroll experts, deliver the interim file import first so promised customers go live, then build the AL extension with its custom API, staging, validation, duplicate protection and reversal handling, the permission set and the setup pages, with automated tests and documentation. We support the first customer rollouts with your team, prepare the app for Microsoft Marketplace if you want a listing, and hand over the code, pipeline and release process to your developers with working sessions and reviews of their first changes. Our own senior AL developers do the work, under your publisher name. The service is Business Central AL development; Microsoft partners that need AL capacity behind their own brand can use our white-label delivery.
If your customers also ask about CRM, those who would rather not carry Microsoft licensing for it can choose a custom CRM. We recommend the right solution: Dynamics 365 (Customer Engagement, Business Central or Finance and Operations), Power Platform, or a custom-built CRM. One team for CRM, ERP and the integration between them.
What do people ask us?
How do we post payroll to Business Central through the API?
Create journal lines in a general journal batch with the API v2.0 journals and journalLines endpoints, add dimensionSetLines per line, then call the post action on the journal. For a product connected to many customers, a custom API in a small AL extension that takes the whole pay run is more robust.
How are payroll cost centres mapped to Business Central dimensions?
Through a mapping table per company that translates each payroll element to a G/L account and each cost centre to a dimension value. Validate every line against default dimension rules, blocked values and combinations before anything posts.
How do we stop a pay run from posting twice?
Give every pay run a unique ID, carry it on every line and in the staging table, and refuse any run whose ID was already imported or posted. Corrections are new runs with their own ID.
Can customers go live before the integration is built?
Yes, with an interim file import into a general journal, through Edit in Excel, a configuration package or a small XMLport. Use the future API layout and keep the pay run ID in the file so the move to the connector changes only the transport.
Should a payroll integration be an AppSource app?
If you will connect many Business Central customers, usually yes: installation, updates and trust are simpler through Microsoft Marketplace. Build it for validation from the start; you remain the publisher.
Can our own developers maintain the connector later?
Yes. It is built in your source control, under your publisher and object prefix, with tests, a build pipeline and documentation, and your developers review pull requests from the start before a formal handover.
What does Solzet deliver for a payroll to Business Central integration?
An interim file import, then an AL extension with a custom API, mapping, validation, duplicate protection and reversals, tests and documentation, rollout support, optional Marketplace preparation and a handover to your developers.
Where should you go next?
Business Central AL development
Extensions, custom APIs, integrations and Microsoft Marketplace apps built in AL.
Business Central AppSource validation checklist
What actually stops a Business Central app in Marketplace validation.
Chart of accounts and dimensions design
Accounts, dimensions and posting groups designed before data moves.
Business Central API limits and 429 errors
Rate limits, backoff and efficient request patterns.
White-label delivery for Microsoft partners
AL, X++ and Power Platform capacity behind your brand.
Which solution is right for your business?
Tell us what you need. A senior consultant replies within one business day with a recommendation (Customer Engagement, Business Central, Finance and Operations, Power Platform or a custom-built CRM), not a sales script.