ml-connector
Sage IntacctPaylocity

Sage Intacct and Paylocity integration

Sage Intacct runs your accounting and finance operations. Paylocity runs payroll and HR. Connecting the two keeps your GL accounts reconciled with payroll spend and your employee roster aligned across systems. After each payroll run, labor cost allocations automatically post into Sage Intacct's general ledger without manual re-entry. Employee hires, terminations, and changes sync from Paylocity into Sage Intacct so headcount and payroll GL accounts stay in agreement.

How Sage Intacct works

Sage Intacct is a cloud-based ERP exposing GL accounts, vendors, AP bills, AP payments, and dimensions through a single XML gateway endpoint at https://api.intacct.com/ia/xml/xmlgw.phtml. Authentication is session-based: you provide senderId, senderPassword, companyId, userId, and userPassword, and Sage Intacct returns a sessionid that is valid for 50 minutes. The XML gateway requires all operations to serialize through a single POST connection and returns HTTP 200 even on application errors, so errors must be detected by parsing errormessage tags inside the XML response body. Sage Intacct does not support webhooks, so all data is read through polling.

How Paylocity works

Paylocity is a cloud-based HCM and payroll platform exposing employees, pay statements, earnings, deductions, companies, work locations, positions, and pay grades through REST APIs at https://api.paylocity.com/api/v2 in production and https://dc1demogwext.paylocity.com for sandbox. Authentication uses OAuth2 client credentials: you exchange client_id and client_secret for a Bearer token valid for 3600 seconds at https://dc1prodgwext.paylocity.com/public/security/v1/token. Paylocity supports webhooks for New Hire, Employee Change, Termination, Payroll Processed, and Time Off Approval events, retrying for up to 24 hours on failure, but webhook payloads carry only identifiers and require follow-up API calls to fetch full record data. Paylocity does not expose vendor, invoice, purchase order, or GL account objects.

What moves between them

The main flow runs from Paylocity into Sage Intacct. After each payroll run, ml-connector reads Paylocity pay statements and earnings, calculates labor cost totals by employee and cost center, and posts those totals into Sage Intacct's general ledger, mapped to the corresponding GL accounts and dimensions. Employee records flow from Paylocity into Sage Intacct so the vendor roster reflects current hires, terminations, and rehires. Cost centers and work locations are aligned in both directions so payroll allocations map to valid Sage Intacct dimensions. The integration polls Paylocity webhooks where enabled and fetches full records via the REST API; for Sage Intacct, it polls on a schedule you control because Sage Intacct does not push data.

How ml-connector handles it

ml-connector obtains a Paylocity OAuth2 Bearer token from the token endpoint and caches it for 3600 seconds, refreshing on the next call if expired or if Paylocity returns a 401. For Sage Intacct, it calls the sendgetAPISession endpoint with your senderId and senderPassword credentials, receives a sessionid good for 50 minutes, and caches it for reuse across calls in that window. On the XML side, ml-connector strips forbidden C0 control characters from payroll data before escaping entity references and serializing, because Sage Intacct rejects XML with control characters in the payload. Because Sage Intacct returns HTTP 200 on all requests, ml-connector parses the XML response body for status tags and errormessage elements to detect errors. For idempotency, it uses the uniqueid flag in the Sage Intacct XML control block on retried calls so the server deduplicates repeated sends. Paylocity employee change events may fire multiple times per minute, so ml-connector deduplicates by employee key on arrival. Both tokens are refreshed before they expire so outages are prevented, and every record carries a full audit trail.

A real-world example

A mid-sized staffing company runs Sage Intacct for accounting and Paylocity for payroll across eight offices nationwide. Before integration, the finance team received Paylocity pay registers each week, manually extracted labor costs by office, and entered them into Sage Intacct's GL as a lump-sum journal. Reconciling actual labor spend across GL accounts took days. With Sage Intacct and Paylocity connected, the payroll GL journals post automatically after each pay run, allocated to the correct cost centers per office, and employee terminations in Paylocity immediately remove access to office cost codes in Sage Intacct's vendor dimension. Month-end close now starts with labor GL accounts pre-reconciled, and manual data entry is eliminated.

What you can do

  • Post Paylocity payroll GL documents into Sage Intacct's general ledger after every pay run, allocated to the correct cost centers and GL accounts.
  • Sync Paylocity employee records (hires, terminations, rehires) into Sage Intacct's vendor and dimension tables so headcount is always current.
  • Map Paylocity cost centers, work locations, and positions to Sage Intacct GL dimensions so payroll allocations land on valid accounts.
  • Handle Paylocity OAuth2 token refresh, Sage Intacct session caching and expiry, and XML control character stripping before payload send.
  • Support both webhook event delivery and scheduled polling, with automatic deduplication and a full audit trail on every record.

Questions

Which direction does data flow between Sage Intacct and Paylocity?
The main flow is Paylocity into Sage Intacct. Payroll GL documents and employee records move from Paylocity into Sage Intacct's GL accounts and dimension tables. Cost centers and work locations are aligned in both directions. Sage Intacct's GL accounts are read-only from the payroll side, so ml-connector does not write financial entries back into Paylocity.
How does ml-connector handle Sage Intacct's XML gateway and session expiry?
ml-connector calls sendgetAPISession with your senderId and senderPassword, receives a sessionid valid for 50 minutes, and caches it for reuse within that window. Before expiry, it refreshes the token so polling is never interrupted. Because the XML gateway returns HTTP 200 on all calls, ml-connector parses the response XML for status tags and errormessage elements to detect application-level errors.
Does the integration handle Paylocity's webhook events and token refresh?
Yes. ml-connector receives Paylocity webhook events for New Hire, Employee Change, Termination, and Payroll Processed, and also polls the REST API for completeness. It obtains OAuth2 Bearer tokens from Paylocity's token endpoint, caches them for 3600 seconds, and refreshes automatically when they expire or when Paylocity returns 401. Both systems stay current without manual intervention.

Related integrations

Connect Sage Intacct and Paylocity

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

Get started