ml-connector
Microsoft Dynamics 365 Business CentralPaylocity

Microsoft Dynamics 365 Business Central and Paylocity integration

Microsoft Dynamics 365 Business Central runs finance and the general ledger. Paylocity runs payroll, HR, and benefits. Connecting the two keeps your workforce and your ledger in agreement without re-keying. After each Paylocity payroll run, the gross earnings, taxes, and deduction totals post into Business Central as general journal lines, and new hires, changes, and terminations in Paylocity line up with Business Central employee records. ml-connector handles the different APIs on each side and moves the data on the cadence your payroll calendar sets.

How Microsoft Dynamics 365 Business Central works

Microsoft Dynamics 365 Business Central exposes its data through the Business Central API v2.0, a REST surface built on OData v4 with JSON payloads. All resources nest under a company inside a named environment, and access uses OAuth 2.0 client credentials against Microsoft Entra ID. Relevant entities include employees (read and write), general ledger accounts and general ledger entries (read only), dimensions (read only), and journals, which is where vendor and general postings are written. Business Central also offers push webhooks through a subscription API, but those notifications carry only a change signal, so the connector must fetch the changed record afterward, and subscriptions expire every three days.

How Paylocity works

Paylocity exposes its data through the Paylocity Web Services API, a REST service returning JSON over HTTPS. Every call uses an OAuth 2.0 client credentials bearer token that lasts one hour, and the Paylocity company id is a path parameter on every data endpoint. Employees are read and write, pay statements and payroll history are read only, and deductions and earnings are read and write. Paylocity is an HCM and payroll platform, so it has no vendor, invoice, purchase order, or GL account objects. Paylocity can also push lightweight webhooks for New Hire, Employee Change, Termination, and Payroll Processed events, each carrying identifiers only.

What moves between them

The main flow runs from Paylocity into Microsoft Dynamics 365 Business Central. After each payroll run, ml-connector reads the Paylocity pay statement totals and posts the earnings, tax, and deduction amounts as general journal lines into Business Central, mapped to the matching GL accounts and dimensions. Employee records flow the same direction so Business Central headcount reflects Paylocity hires, terminations, and changes. Reference data such as departments and pay codes is aligned so each payroll line lands on a valid account and dimension. Pay statements are read only in Paylocity, so ml-connector never writes financial entries back into payroll.

How ml-connector handles it

ml-connector stores both credential sets encrypted and mints a fresh token for each side, refreshing the one-hour Paylocity token before it expires and the Entra ID token for Business Central when a call returns 401. It listens for the Paylocity Payroll Processed webhook, then uses the companyId and processId from that lightweight payload to pull the full pay statement totals, since the webhook itself carries identifiers only. Because Business Central GL accounts are read only, payroll totals are written through general journal lines rather than against the chart of accounts directly. Departments and pay codes are mapped first, so every journal line references a GL account and dimension that already exist in Business Central. Paylocity sends no HMAC signature, so the callback endpoint is secured with TLS and the optional Basic auth Paylocity supports, and a scheduled poll using lastModifiedDateTime backfills employees a webhook missed. Paylocity rate limits return HTTP 429, so ml-connector backs off and retries, tracks the annual client secret rotation, and keeps a full audit trail with replay on every record.

A real-world example

A mid-market professional services firm of about four hundred employees runs Microsoft Dynamics 365 Business Central for finance and the general ledger and uses Paylocity for payroll and HR across several locations. Before the integration, the accounting team exported a payroll register from Paylocity every pay period and keyed the labor, tax, and deduction totals into Business Central by hand, then chased differences between HR headcount and the payroll accounts during month-end close. With the two systems connected, each payroll run posts into Business Central automatically, allocated to the dimension for each location, and employee changes keep the two systems aligned. Close starts with the payroll accounts already reconciled and the manual re-keying gone.

What you can do

  • Post Paylocity payroll earnings, tax, and deduction totals into Business Central general journals after every pay run.
  • Keep Microsoft Dynamics 365 Business Central employee records aligned with Paylocity new hires, changes, and terminations.
  • Map Paylocity departments and pay codes to Business Central GL accounts and dimensions so payroll lands on valid accounts.
  • Authenticate Paylocity with its one-hour OAuth token and Business Central with Entra ID client credentials, refreshing each before expiry.
  • Trigger on the Paylocity Payroll Processed webhook, with scheduled polling, retries, and a full audit trail as backup.

Questions

Which direction does data move between Microsoft Dynamics 365 Business Central and Paylocity?
The main flow is Paylocity into Business Central. Payroll totals and employee records move from Paylocity into Business Central, while departments and pay codes are aligned so postings land on valid accounts. Paylocity pay statements are read only, so ml-connector does not write financial entries back into payroll.
How does the integration post payroll if Paylocity has no GL accounts and Business Central accounts are read only?
Paylocity is an HCM and payroll system with no chart of accounts, and the Business Central GL accounts endpoint is read only. ml-connector pulls the pay statement totals from Paylocity, maps the earnings, tax, and deduction codes to GL accounts, and writes them as general journal lines in Business Central, which is the writable posting path.
How does the integration handle Paylocity webhooks that carry only identifiers?
Paylocity webhooks such as Payroll Processed and New Hire are lightweight and send only identifiers, with no full record data and no HMAC signature. ml-connector uses the companyId and processId or employeeId from the payload to fetch the full record from the API, secures the callback with TLS and optional Basic auth, and runs a scheduled poll to backfill anything a webhook missed.

Related integrations

Connect Microsoft Dynamics 365 Business Central and Paylocity

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started