ml-connector
SAP S/4HANAPipedrive

SAP S/4HANA and Pipedrive integration

Your ERP holds master data on every customer and supplier. Your CRM needs that same data to keep deals, pipelines, and customer relationships current. SAP S/4HANA and Pipedrive connected keep customer and supplier information aligned across both systems without manual updates. New customers and suppliers created in SAP flow into Pipedrive as organizations, and changes to contact details, company names, and roles sync automatically so your sales team always has the latest information.

How SAP S/4HANA works

SAP S/4HANA exposes business partners, suppliers, customers, company codes, and related master data through OData V2 and V4 REST APIs served from a tenant-specific base URL (https://<tenant-id>-api.s4hana.ondemand.com). Authentication uses OAuth 2.0 client credentials, with short-lived tokens (typically 12 hours) that must be cached and refreshed before expiry. Tokens are obtained from a tenant-specific token endpoint; the endpoint URL is not constructed but instead copied from your Communication Arrangement OAuth details. SAP S/4HANA does not provide native webhooks for cloud or on-premise deployments, so data is read by polling with lastChangeDateTime filters or delta tokens to detect updates since the last poll.

How Pipedrive works

Pipedrive is a cloud CRM platform accessed through REST JSON APIs at https://api.pipedrive.com/v1/ and https://api.pipedrive.com/api/v2/. Authentication uses either an API token passed in the x-api-token header (tied to a specific user account) or OAuth2 bearer tokens obtained through the authorization code flow. Pipedrive exposes sales objects including organizations, persons, deals, products, and pipelines. Pipedrive can receive updates via webhooks (both v1 and v2 formats with HMAC-SHA256 signature verification), but it can also be polled directly. Daily API token budgets vary by plan; reads cost 2 tokens per entity and 20 tokens per collection query, writes cost 10 tokens, and deletes cost 6.

What moves between them

Business partners, customers, and suppliers from SAP S/4HANA flow into Pipedrive as organizations and persons. Customer master records (A_Customer, A_BusinessPartner with role 0001) become Pipedrive organizations, with contact names, email addresses, and phone numbers from SAP synced to Pipedrive persons. Supplier data (A_Supplier, A_BusinessPartner with role 0002) also flows into organizations so procurement contacts are visible in the CRM. The sync runs on a schedule you control via ml-connector, polling SAP for changes since the last run and updating or creating matching records in Pipedrive. The data flow is one-way, from SAP into Pipedrive, since Pipedrive is read-only for ERP-sourced data.

How ml-connector handles it

ml-connector stores both the SAP OAuth credentials and the Pipedrive API token encrypted. On each poll, it connects to SAP using OAuth 2.0 client credentials, obtains a short-lived bearer token, and caches it until near expiry to avoid re-authenticating on every request. It then queries the A_BusinessPartner, A_Customer, and A_Supplier OData entities using filters on lastChangeDateTime to find records changed since the last run. For each business partner, ml-connector looks up the corresponding SAP role (customer or supplier) and maps it to Pipedrive organization type. Contact details such as phone number and email are extracted from the business partner record and synced to Pipedrive persons linked to the organization. When Pipedrive's rate limits are hit (varying by plan, typically 20-120 requests per 2 second window for API token auth), ml-connector backs off exponentially and retries. Every inbound record is timestamped with a lastSyncTime and tracked in the audit log so replays are possible if a downstream call fails. Custom fields in Pipedrive are referenced by their internal hash IDs, which ml-connector retrieves once and caches for the session.

A real-world example

A mid-market B2B software company runs SAP S/4HANA for finance and procurement and Pipedrive for sales pipeline management. As new customers sign contracts, they are entered in SAP as business partners. Before the integration, the sales team maintained a separate manual contact list in a spreadsheet, checking SAP and Pipedrive independently to verify customer details and mailing addresses. With SAP and Pipedrive connected, each new customer created in SAP automatically appears in Pipedrive as an organization within hours, complete with billing address and phone number. When SAP updates a customer's address after a move, Pipedrive reflects the change immediately. The sales team now has a single source of truth and spends less time chasing down outdated address and contact information.

What you can do

  • Sync SAP S/4HANA business partners into Pipedrive organizations, keeping customer and supplier master data current across both systems.
  • Map SAP customer and supplier roles to Pipedrive organization types so CRM records reflect the correct relationship category.
  • Flow contact details such as email, phone number, and company name from SAP into Pipedrive persons and organizations.
  • Authenticate SAP S/4HANA with OAuth 2.0 client credentials and manage short-lived token refresh automatically.
  • Poll SAP on a schedule you control, with encrypted credential storage, exponential retry on rate limits, and a full audit log of every sync.

Questions

Which direction does data move between SAP S/4HANA and Pipedrive?
Business partner and supplier data flows one-way from SAP S/4HANA into Pipedrive. Customer and supplier records created or updated in SAP sync into Pipedrive as organizations, and contact information flows into Pipedrive persons. Pipedrive does not push data back into SAP because Pipedrive is a CRM tool and does not expose procurement or financial entities.
How does ml-connector handle SAP's OAuth token expiry?
SAP S/4HANA tokens are short-lived, typically valid for 12 hours. ml-connector obtains a token from your tenant-specific endpoint, caches it, and refreshes it before expiry so every API call has a valid bearer token. The token endpoint URL is not constructed; it is copied from your SAP Communication Arrangement OAuth details during setup.
What happens when Pipedrive's API rate limit is reached?
Pipedrive's rate limit depends on your plan and authentication method, ranging from 20 to 120 requests per 2 second window for API token auth. When ml-connector hits the limit, it backs off exponentially with jitter and retries the request after the wait period, ensuring data flows without gaps or failures.

Related integrations

Connect SAP S/4HANA and Pipedrive

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

Get started