ml-connector
SAP ECCHubSpot

SAP ECC and HubSpot integration

SAP ECC runs your financial operations and vendor relationships. HubSpot runs your sales and customer engagement. Connecting the two keeps your customer and vendor master data aligned. Prospects and customers created in HubSpot sync into SAP ECC as customer records, capturing sales pipeline data into your ERP. Vendors and customers already in SAP ECC flow into HubSpot as companies and contacts, so your sales team always has current pricing, payment terms, and credit status from the ERP.

How SAP ECC works

SAP ECC is an on-premises ERP system that exposes vendor, customer, material, cost center, and financial document data through BAPI function modules (such as BAPI_VENDOR_GETLIST, BAPI_CUSTOMER_GETDETAIL, BAPI_ACC_DOCUMENT_POST) and OData v2 REST services via SAP Gateway. Access requires HTTP Basic Auth credentials (username and password) for OData, or RFC authentication via the SAP .NET Connector or Java Connector for direct BAPI calls. SAP ECC has no native webhook system, so data is retrieved by polling on a scheduled interval using RFC_READ_TABLE or OData list endpoints. The on-premises nature of SAP ECC requires a network agent to originate RFC/BAPI calls from the customer's internal network.

How HubSpot works

HubSpot is a cloud CRM platform that exposes contacts, companies, deals, and custom objects through a REST API at https://api.hubapi.com, protected by a Bearer token (Private App Access Token). HubSpot also supports webhooks with signature verification for real-time push notifications on contact, company, and deal changes. The platform uses cursor-based pagination with a 200-record limit per request and enforces rate limits of 100 to 190 calls per 10 seconds depending on the subscription tier. Companies and contacts can be associated with custom properties that hold vendor codes, SAP plant IDs, and other ERP reference data.

What moves between them

Customer and vendor master records flow bidirectionally. SAP ECC customers and vendors are polled on a scheduled interval and synced to HubSpot as companies and contacts, with SAP fields mapped to HubSpot custom properties (vendor number, credit limit, payment terms, plant assignment). Changes to companies and contacts in HubSpot (phone, address, contact name) trigger an update back to the corresponding SAP ECC customer or vendor record via BAPI_CUSTOMER_CHANGE or BAPI_VENDOR_CHANGE. HubSpot deals and line items are mapped to purchase orders in SAP ECC only when explicitly configured per customer.

How ml-connector handles it

ml-connector stores the SAP ECC on-premises agent endpoint (the RFC gateway hostname and port) and the HubSpot API token encrypted, then periodically polls SAP ECC BAPI endpoints via RFC_READ_TABLE or OData to fetch the current vendor and customer rosters. Each record is checked for a unique identifier (vendor number or customer number) and matched to an existing HubSpot company or contact. If a match is found, the HubSpot custom property values are updated; if not, a new company or contact is created. When HubSpot records are changed through the UI or API, ml-connector watches for those changes via HubSpot's webhook system, retrieves the updated fields from HubSpot, maps them back to SAP ECC field names, and calls the appropriate BAPI change function with the ERP transaction commitment. SAP ECC BAPIs require an explicit commit call to finalize changes, and ml-connector includes that in every write request. HubSpot rate limits are managed through request queuing and exponential backoff on 429 responses. On-premises RFC connectivity is validated on each poll cycle, and if the agent is unreachable, an alert is logged and the next scheduled poll is attempted after a brief delay.

A real-world example

A mid-market B2B software company runs SAP ECC on-premises for procurement and vendor management, and uses HubSpot for sales. The sales team sources prospects from industry directories and builds deals in HubSpot, but frequently discovers that deals reference a vendor or customer already in SAP ECC under a different contact name or address variant. When a prospect converts to a customer, the sales team must manually enter the new account into SAP ECC so procurement can issue purchase orders to the same entity. With SAP ECC and HubSpot connected, existing vendors and customers in the ERP appear automatically in HubSpot as company records, and when a new deal closes in HubSpot, the prospect is pushed into SAP ECC as a customer in the same transaction. The procurement team sees new customers immediately, and the sales team no longer re-enters customer data across the two systems.

What you can do

  • Sync vendor and customer master records from SAP ECC into HubSpot companies and contacts on a polling schedule.
  • Map SAP ECC customer numbers, credit limits, and payment terms to HubSpot custom properties so sales has current ERP data.
  • Push new customers and updates from HubSpot deals back to SAP ECC customer records via BAPI_CUSTOMER_CREATE and BAPI_CUSTOMER_CHANGE.
  • Authenticate to SAP ECC via HTTP Basic Auth for OData and RFC gateway credentials for BAPI calls, and to HubSpot via Private App Bearer token.
  • Track and retry failed records with a full audit log, so data mismatches are immediately visible.

Questions

Which records move between SAP ECC and HubSpot, and in which direction?
Vendor and customer master records flow from SAP ECC into HubSpot as companies and contacts. Changes to company and contact details in HubSpot (phone, address, contact person) are pushed back to SAP ECC as customer or vendor record updates. HubSpot deals are read by ml-connector but typically synced to SAP ECC purchase orders only when explicitly configured per customer, since every deal does not map to a procurement need.
Does the integration work with SAP ECC on-premises, or does it require the cloud version?
ml-connector works with SAP ECC on-premises only. It cannot reach SAP ECC directly from the cloud, so it requires an on-premises SAP .NET Connector or Java Connector agent running on the customer's network to originate RFC and BAPI calls. The agent endpoint (gateway host and port) is stored encrypted in ml-connector's configuration and used for every RFC request.
How does ml-connector handle the differences in how SAP ECC and HubSpot represent vendor and customer data?
ml-connector maps SAP ECC vendor and customer fields to HubSpot companies and contacts using a custom field schema. SAP-specific identifiers like vendor number, plant assignment, and dunning status are stored in HubSpot custom properties. When a record is updated in either system, ml-connector translates the field names and types (for example, SAP date format YYYYMMDD to ISO 8601) so both systems remain in agreement.

Related integrations

Connect SAP ECC and HubSpot

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

Get started