SAP S/4HANA and BambooHR integration
This connection keeps people data consistent between BambooHR, the HR system of record, and SAP S/4HANA, the ERP. BambooHR holds employees, their job information, and compensation history; SAP S/4HANA holds business partners, cost centers, and the chart of accounts. ml-connector moves employee records from BambooHR into SAP S/4HANA as business partners and keeps department and cost center assignments matched on both sides. BambooHR has no vendors, invoices, or GL accounts of its own, so the flow is one directional: people and org structure out of BambooHR and into SAP.
What moves between them
Records move in one direction: from BambooHR into SAP S/4HANA. Employees become or update business partners in SAP, with department and cost center pulled from the BambooHR job information table and matched to SAP cost center master data. Hires create or refresh the SAP record, and terminations update the matching business partner so finance reflects current headcount. SAP S/4HANA does not send vendors, invoices, or payroll back to BambooHR, so there is no reverse flow. Cadence is a scheduled poll of the BambooHR employees endpoint, with near-real-time updates when BambooHR webhooks are enabled.
How ml-connector handles it
ml-connector holds two credential sets and bridges them on every run. On the BambooHR side it uses an OAuth bearer token, refreshing against the subdomain-scoped token URL since BambooHR has no single global token endpoint. On the SAP side it requests an OAuth 2.0 client credentials token from the tenant token URL given in the Communication Arrangement, caches it until it nears its roughly twelve hour expiry, and before any create or update fetches an X-CSRF-Token with a Fetch request, sending the token and cookies back on the write. BambooHR employees are read with explicit fields requested by name, because the API returns only the id by default and caps requests at 400 fields. Each employee maps to an SAP business partner: name and email to partner fields, and the job information department and cost center to SAP cost center values. BambooHR webhooks carry only the employee id and a changedFields list, so the connector fetches the full employee with GET before writing. Edge cases handled include SAP duplicate detection on natural keys, SAP 403 with a stale CSRF token (re-fetch and retry), SAP 429 with Retry-After (exponential backoff with jitter), and BambooHR 503 throttling and 409 conflicts on duplicate emails.
A real-world example
A 600-person engineering services firm runs BambooHR for HR and SAP S/4HANA Cloud for finance. When someone is hired or moves teams, HR updates BambooHR but finance only learns weeks later through a spreadsheet, so cost center reporting in SAP lags and terminated staff linger on internal partner lists. With this sync, each BambooHR hire, termination, and department change updates the matching SAP business partner and its cost center on the next poll, keeping headcount and org structure in SAP current without manual re-entry.
What you can do
- Create and update SAP S/4HANA business partners from BambooHR employee records.
- Keep SAP cost center assignments aligned with the BambooHR job information table.
- Reflect BambooHR hires and terminations in the matching SAP business partner.
- Bridge BambooHR OAuth and SAP tenant tokens, including the SAP X-CSRF-Token step.
- Pull full employee detail on BambooHR webhooks before writing to SAP S/4HANA.
Questions
- Does this sync payroll from BambooHR into SAP S/4HANA?
- No. The core BambooHR API exposes compensation history as a versioned table, but it does not expose payroll run output. This connector moves employee master and organization data, not payroll postings. Payroll totals in SAP S/4HANA come from your payroll provider, not from BambooHR.
- Why does the sync run on a schedule instead of instantly?
- SAP S/4HANA Cloud does not push webhooks to external URLs, so reads use polling with a filter on LastChangeDateTime. BambooHR does send webhooks on employee changes, so when those are enabled the connector reacts in near real time by fetching the changed employee. Without webhooks, the scheduled poll of the BambooHR employees endpoint keeps SAP current.
- What does an SAP admin need to set up first?
- Before any API call works, an SAP admin must create a Communication Arrangement that activates the Business Partner scenario and issues the OAuth 2.0 client id, secret, and token URL. On the BambooHR side you register an OAuth app for the company subdomain or supply a legacy API key. Once both credential sets are in ml-connector, the sync runs unattended.
Related integrations
More SAP S/4HANA integrations
Other systems that connect to BambooHR
Connect SAP S/4HANA and BambooHR
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started