ml-connector
MYOBPaylocity

MYOB and Paylocity integration

MYOB runs accounting and finance for small and mid-sized businesses. Paylocity runs payroll and HR. Connecting the two keeps your general ledger and workforce roster aligned after every payroll run. Payroll GL postings flow automatically from Paylocity into MYOB's general ledger on the correct accounts, and employee records stay current with Paylocity hires, terminations, and changes. ml-connector handles the very different credentials and API structures on each side so the manual GL entry step disappears.

How MYOB works

MYOB Business API (AccountRight Live API v2) exposes contacts (suppliers, customers, employees), purchase orders, bills, invoices, general ledger accounts, journal entries, and inventory through REST with OData v3 query parameters. Cloud production uses tenant-specific base URLs at api.myob.com with OAuth2 bearer tokens plus company file credentials in the request headers (both required for every call). MYOB does not publish webhooks, so records are discovered by polling with LastModified filters and paging up to 1000 records per call. Access tokens expire in 20 minutes and refresh tokens last one week.

How Paylocity works

Paylocity is a cloud payroll and HCM platform exposing employees, pay statements, earnings, deductions, and work locations through REST JSON APIs under the coreHr and apihub namespaces. It authenticates via OAuth2 client credentials with a three-hour bearer token. Paylocity publishes webhook events for new hire, employee change, termination, payroll processed, and time off approval; webhooks retry for 24 hours on failure but carry only record identifiers, so full data must be fetched via API calls. Paylocity exposes no vendor, invoice, purchase order, or GL account objects, so all GL postings are read from the payroll processing events and mapped to MYOB's general ledger.

What moves between them

The main flow runs from Paylocity into MYOB. After each payroll run, ml-connector reads Paylocity's payroll processed event and fetches the GL impact of that payroll cycle (earnings, deductions, taxes, benefits), then posts those totals into MYOB's general ledger as journal entries allocated to the correct GL accounts. Employee records from Paylocity (new hires, terminations, status changes) sync into MYOB as contacts so the HR roster stays current. Since Paylocity has no purchase order or AP objects, no AP records move from MYOB into Paylocity; the integration is read-only on Paylocity's payroll side and write-only on MYOB's ledger side.

How ml-connector handles it

ml-connector stores both OAuth credential sets encrypted: the Paylocity client_id and client_secret are stored per tenant, and the MYOB OAuth token plus company file username and password are cached and refreshed when the 20-minute MYOB access token expires. It subscribes to Paylocity webhook events for payroll processed, new hire, and termination, then polls Paylocity's payroll processing endpoint to fetch GL detail lines. Each payroll GL line is mapped to a MYOB GeneralJournal entry on the matching GL account, and employee records are inserted or updated as MYOB contacts. Because both MYOB and Paylocity require their full credentials on every request, ml-connector refreshes both token sets in advance of expiry and uses MYOB's RowVersion field to avoid 409 conflicts on updates. Paylocity webhooks arrive with event identifiers only, so ml-connector fetches full record data via API, then applies BullMQ deduplication by jobId so a duplicate webhook does not create duplicate GL entries.

A real-world example

A mid-sized US services firm runs Paylocity for payroll and benefits across 150 employees spread across two locations, and MYOB for AP, AR, and general ledger accounting. Before the integration, the accounting team ran a weekly export from Paylocity's payroll report after every pay period, manually classified the GL impact by account and location, and re-keyed the journal entries into MYOB by hand. Monthly reconciliation meant matching Paylocity payroll reports against MYOB GL balances, a process that took two days and often turned up re-entry errors. With Paylocity and MYOB connected, the payroll GL postings flow directly into MYOB's ledger on the correct accounts every payroll period, and employee terminations in Paylocity automatically mark the contact inactive in MYOB so payroll posting addresses do not fall out of sync.

What you can do

  • Post payroll GL entries from Paylocity into MYOB's general ledger after every pay run, allocated to the correct GL accounts.
  • Keep MYOB employee contacts aligned with Paylocity hires, terminations, and status changes.
  • Authenticate Paylocity with OAuth2 client credentials and MYOB with its OAuth token plus company file credentials, refreshing tokens before expiry.
  • Poll Paylocity on your payroll calendar and subscribe to payroll processed, new hire, and termination webhook events.
  • Map Paylocity GL line items to MYOB GeneralJournal entries with full audit trail and error replay capability.

Questions

Which direction does data move between MYOB and Paylocity?
The main flow is Paylocity into MYOB. Payroll GL entries and employee records move from Paylocity into MYOB after every payroll run. MYOB has no AP invoices or vendor objects to send to Paylocity, so the integration is read-only on Paylocity and write-only on MYOB's ledger side.
Does MYOB's requirement for both OAuth token and company file credentials add complexity?
ml-connector stores both credential sets encrypted and presents them on every request to MYOB. The OAuth access token expires every 20 minutes, so ml-connector refreshes it before expiry and also maintains the company file credentials in the request headers. A stale or incorrect company file credential returns a 401, which triggers a refresh cycle.
How does the integration handle Paylocity's webhook-plus-polling model?
ml-connector subscribes to Paylocity's payroll processed, new hire, and termination webhooks, which arrive with event identifiers only. It then fetches full record data via API calls, deduplicates on jobId to prevent duplicate GL entries if a webhook retries, and polls the payroll detail endpoint to ensure no events are missed if webhooks are delayed or fail within the 24-hour retry window.

Related integrations

Connect MYOB and Paylocity

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

Get started