ml-connector
SAP ECCZoho CRM

SAP ECC and Zoho CRM integration

SAP ECC runs your enterprise finance and procurement on premises, while Zoho CRM manages your sales and vendor relationships in the cloud. Connecting the two keeps your customer and vendor master data aligned across both systems, eliminates manual re-entry, and lets your sales and procurement teams work from a single source of truth. Customer records flow from SAP ECC into Zoho CRM Accounts, vendor records flow both directions to keep procurement and vendor relationships synchronized, and purchase orders created in Zoho CRM post directly into SAP ECC without leaving the system.

How SAP ECC works

SAP ECC exposes vendor master data through BAPI_VENDOR_GETLIST and BAPI_VENDOR_GETDETAIL, customer records via BAPI_CUSTOMER_GETLIST and BAPI_CUSTOMER_GETDETAIL, purchase orders through BAPI_PO_GETDETAIL1, and GL documents via BAPI_ACC_DOCUMENT_POST, all accessible through OData v2 REST endpoints at http://<host>:<port>/sap/opu/odata/<namespace>/<service>/ or through RFC/BAPI calls via an on-premises agent running the SAP .NET Connector or Java Connector. Authentication uses HTTP Basic Auth for OData or RFC Basic Auth for BAPI calls. SAP ECC has no native webhook registry, so data is read by polling on a scheduled interval, though outbound IDoc push (ORDERS05, INVOIC02) is available if the customer's SAP Basis team configures WE21 delivery channels.

How Zoho CRM works

Zoho CRM presents Accounts, Contacts, Vendors, Purchase_Orders, Invoices, and Sales_Orders as REST resources at https://www.zohoapis.{region}/crm/v8, secured with OAuth 2.0 using Authorization Code flow with offline_access scope for refresh token persistence. The platform supports webhook channels for create/edit/delete events on most modules, though channels expire approximately every 24 hours and must be renewed via PATCH /crm/v8/actions/watch. Webhook notifications contain only record IDs and require a subsequent GET fetch to retrieve the full payload. Access tokens expire after 1 hour and are refreshed from the persisted refresh_token. The token response includes an api_domain field that becomes the base URL for all subsequent requests.

What moves between them

Customer and vendor records flow from SAP ECC into Zoho CRM as Accounts and Contacts, refreshed on a scheduled poll (typically daily or hourly). Purchase orders created in Zoho CRM flow back into SAP ECC via BAPI_PO_CREATE1 calls, mapped to vendor records that exist in both systems. Invoices received in Zoho CRM can post into SAP ECC's general ledger via BAPI_ACC_DOCUMENT_POST. Reference data such as vendors, customers, and GL accounts is aligned in both directions so sales and procurement work from the same master.

How ml-connector handles it

ml-connector maintains two separate credential sets - SAP ECC HTTP Basic Auth credentials and Zoho CRM OAuth 2.0 (stored encrypted with a refresh_token for automatic token renewal). On the SAP ECC side, it connects through the customer's on-premises RFC gateway (requiring SAP .NET Connector or Java Connector to be installed and running), polls vendor and customer records via OData or RFC_READ_TABLE on a defined schedule, and handles the 512-character row-width constraint of RFC_READ_TABLE by switching to BBP_RFC_READ_TABLE for wide tables. On the Zoho CRM side, it refreshes the access token hourly before expiry and watches the api_domain value returned in each token response to ensure subsequent API calls use the correct region-specific endpoint. When posting purchase orders from Zoho back to SAP ECC, ml-connector calls BAPI_PO_CREATE1 and issues an explicit BAPI_TRANSACTION_COMMIT to lock the document (forgetting commit leaves records in a locked state that blocks future updates). It handles SAP ECC rate limits of 10-50 concurrent RFC calls by backing off on SYSTEM_FAILURE or COMMUNICATION_FAILURE exceptions and retries with exponential jitter. Every record carries a full audit trail and can be replayed if a BAPI call fails.

A real-world example

A mid-market manufacturing company runs SAP ECC on premises for procurement, finance, and inventory, and uses Zoho CRM in the cloud to manage sales and customer relationships. Before the integration, vendor and customer master records were maintained in both systems independently, and the sales team had to manually look up customer codes in SAP to create accurate quotes in Zoho, while the procurement team re-entered vendor changes from Zoho into SAP by hand every week. With SAP ECC and Zoho CRM connected, customer records sync from SAP into Zoho Accounts automatically each night, so the sales team always sees the correct customer code and credit status, and purchase orders created in Zoho flow directly into SAP without manual re-entry or duplicate checking.

What you can do

  • Sync customer master records from SAP ECC into Zoho CRM Accounts, keeping sales reps aligned with customer credit status and historical account data.
  • Sync vendor records from SAP ECC to Zoho CRM Vendors in both directions, so procurement and vendor relationships stay synchronized.
  • Post purchase orders created in Zoho CRM directly into SAP ECC via BAPI_PO_CREATE1, with full commit and audit trail.
  • Authenticate SAP ECC through the on-premises RFC gateway with .NET Connector or Java Connector, and Zoho CRM with OAuth 2.0 refresh token persistence and region detection.
  • Poll SAP ECC on a scheduled interval with automatic retry on gateway failures, and refresh Zoho CRM tokens before expiry with full audit trail on every record.

Questions

How does ml-connector handle the on-premises SAP ECC connection when Zoho CRM is cloud-based?
SAP ECC requires an on-premises agent running the SAP .NET Connector or Java Connector to accept RFC calls from the outside. ml-connector reaches that gateway using HTTP Basic Auth credentials, then issues BAPI calls through the agent to read and write SAP data. The gateway and agent must be running and accessible from the cloud for the integration to function.
What happens when the Zoho CRM OAuth token expires or the region changes?
ml-connector refreshes the access token automatically every 55 minutes using the persisted refresh_token, well before the 1-hour expiry. Each token response includes an api_domain field that specifies the correct region-specific endpoint (e.g., .eu, .in, .com.au), and ml-connector watches for changes and updates the base URL accordingly to prevent region-mismatch errors.
Can purchase orders created in Zoho CRM fail to post into SAP ECC, and how does ml-connector handle that?
Yes, posting can fail if the vendor record does not exist in SAP ECC, if the cost center or GL account is invalid, or if the RFC gateway is unreachable. ml-connector retries failed posts with exponential backoff and keeps a full audit trail so you can investigate and replay the post once the root cause is fixed (e.g., vendor record created in SAP ECC).

Related integrations

Connect SAP ECC and Zoho CRM

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

Get started