ml-connector
FreshBooksSAP SuccessFactors

FreshBooks and SAP SuccessFactors integration

FreshBooks tracks every invoice, bill, and expense your business creates. SAP SuccessFactors owns your employees, their roles, and their cost centers. Connecting the two means your expense records automatically reference the right people and cost centers in your HR system, so your finance and HR data stay in sync. Employees who leave appear deactivated in SAP SuccessFactors, and those changes flow back to FreshBooks so old cost centers stop appearing on new expenses.

How FreshBooks works

FreshBooks exposes invoices, bills, bill vendors, payments, expenses, chart of accounts, and items through a REST API with granular OAuth 2.0 scopes per resource. Authentication uses user-delegated OAuth 2.0 (not Client Credentials), so each customer logs in and grants scopes explicitly at https://auth.freshbooks.com/oauth/authorize. FreshBooks publishes changes in real-time via webhooks sent to a customer-supplied endpoint, with HMAC-SHA256 signatures in the X-FreshBooks-Hmac-SHA256 header. The webhook delivery is not guaranteed real-time and can range from seconds to several minutes. Webhook payloads are sent as application/x-www-form-urlencoded and include the object ID, account ID, and event name. If a webhook times out after 10 seconds or returns a non-2xx status, FreshBooks retries; persistent failures disable the callback.

How SAP SuccessFactors works

SAP SuccessFactors exposes employees, org structure, cost centers, compensation, and job codes through datacenter-specific OData V2 and V4 REST endpoints. Authentication uses SAML Bearer Assertion tokens created by signing a 10-minute assertion with an RSA private key and exchanging it for a 24-hour bearer token, with Role-Based Permissions required in the Admin Center for each credential pair. Webhooks must be configured through the Admin Center UI, not via API, and fire HMAC-SHA256 signed events for hire, termination, and job changes. ml-connector uses pull-based sync with OData lastModifiedDateTime filters for on-demand delta retrieval rather than relying on webhook delivery. Employees are marked inactive rather than hard-deleted, and SuccessFactors enforces a maximum of 10 concurrent API threads per client.

What moves between them

Expenses, time entries, and invoice line items from FreshBooks flow into SAP SuccessFactors for cost allocation and payroll integration. Employee records and cost center reference data flow from SAP SuccessFactors into FreshBooks so every expense is tagged with a valid employee and cost center from HR. The sync runs on a schedule you control, pulling changes from both systems based on modification timestamps rather than waiting for webhook delivery.

How ml-connector handles it

ml-connector stores the FreshBooks OAuth 2.0 user credentials encrypted and exchanges them on first use and on token expiry to obtain a fresh access token. For SAP SuccessFactors, it generates a new SAML Bearer Assertion signed with the customer's RSA private key every time the 24-hour token expires, rotating credentials without manual intervention. FreshBooks webhooks are registered at the customer endpoint when the integration activates, allowing real-time awareness of invoice updates and new expenses; however, ml-connector also polls FreshBooks on a fallback schedule in case webhook delivery is delayed or disabled. On the SAP SuccessFactors side, ml-connector pulls employee and cost center records using OData filters on lastModifiedDateTime to detect changes since the last sync, avoiding full table scans. Expenses from FreshBooks are mapped to SuccessFactors employees by email or employee ID, and cost allocation is matched against the SuccessFactors cost center code list. If a FreshBooks expense references an employee or cost center that no longer exists in SAP SuccessFactors, the record is held for review so the mapping is never lost. ml-connector respects SuccessFactors' 10-thread concurrency limit and backs off on HTTP 429 throttle responses, retrying with exponential backoff.

A real-world example

A mid-sized service consulting firm uses FreshBooks for invoicing and expense tracking, and SAP SuccessFactors for employee records and compensation across three offices. Before the integration, finance staff manually coded each expense into the right cost center by cross-referencing FreshBooks entries against a staff list pulled from SuccessFactors, a task that took two days per month and often had mismatches. When employees moved between projects or left the firm, the finance team had to hunt for open expenses against old cost centers and reclassify them by hand. After connecting FreshBooks and SAP SuccessFactors, new expenses are automatically tagged with the employee and cost center from SuccessFactors the moment they are logged in FreshBooks, and when an employee moves or leaves, the system flags expenses with deactivated cost centers for review so nothing slips through.

What you can do

  • Map FreshBooks expenses to SAP SuccessFactors employees and cost centers so labor costs are allocated correctly.
  • Sync employee and cost center reference data from SAP SuccessFactors into FreshBooks to keep HR and finance records aligned.
  • Authenticate FreshBooks with user-delegated OAuth 2.0 and SAP SuccessFactors with SAML Bearer Assertion tokens, rotating credentials automatically.
  • Detect changes in both systems using FreshBooks webhooks and SAP SuccessFactors OData delta filters, with a polling fallback schedule.
  • Flag expenses with inactive employees or invalid cost centers for review so data integrity is maintained.

Questions

How does the integration handle the different authentication methods between FreshBooks and SAP SuccessFactors?
FreshBooks uses user-delegated OAuth 2.0, so a customer logs in explicitly and grants scopes to ml-connector at https://auth.freshbooks.com/oauth/authorize. SAP SuccessFactors uses SAML Bearer Assertion tokens signed with an RSA private key, so the customer provides the private key encrypted, and ml-connector signs a fresh assertion every time the token expires, rotating credentials without manual re-authentication.
What happens if a FreshBooks expense references an employee or cost center that no longer exists in SAP SuccessFactors?
ml-connector flags the record for review rather than silently dropping or misallocating it. This ensures that data is never lost and that finance and HR teams can manually resolve the mismatch while the integration continues to process valid records.
Does the integration rely on webhooks or polling?
FreshBooks webhooks are registered to notify ml-connector of real-time changes, but because webhook delivery can be delayed or disabled, ml-connector also polls FreshBooks on a schedule you control. SAP SuccessFactors uses pull-only sync via OData delta filters, since webhook subscription is configured through the Admin Center UI rather than programmatically.

Related integrations

Connect FreshBooks and SAP SuccessFactors

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

Get started