ml-connector
DATEVSalesforce

DATEV and Salesforce integration

Salesforce runs the sales pipeline and customer records. DATEV runs the books. Connecting the two means a deal that closes in Salesforce becomes a booking in DATEV without re-keying. ml-connector reads Account changes and closed Orders or Opportunities from Salesforce, writes the matching customer and vendor master data and finalized journal entries into DATEV as EXTF file jobs, and uploads the invoice PDF into DATEV Unternehmen Online. Because the two systems work very differently, ml-connector handles the Salesforce REST and event APIs on one side and DATEV's asynchronous file-job and document APIs on the other.

How DATEV works

Salesforce exposes Accounts, Contacts, Opportunities, Orders, OrderItems, and Products through its REST API on the org's My Domain URL, with SOQL for filtered reads and upsert by External ID for idempotent writes. Authentication is OAuth 2.0 client credentials, a server-to-server flow that returns a Bearer token and the instance_url to call. For event-driven sync, Salesforce pushes Change Data Capture events over the Pub/Sub API whenever a record is created, updated, or deleted, with replay supported for 72 hours. The standard Invoice and Payment objects exist only in orgs with Revenue Cloud.

How Salesforce works

DATEV is not a conventional REST API. The Rechnungswesen accounting engine is on-premise, and finalized bookings are submitted as EXTF CSV file jobs through a cloud relay; booking suggestions and invoice data go to DATEV Unternehmen Online as DXSO XML jobs. Both are asynchronous: you submit a file, receive a job ID, and poll until it completes, because DATEV sends no webhooks. Invoice PDFs upload through the documents REST API against client-specific document types. Authentication is OAuth 2.0 Authorization Code with PKCE through login.datev.de, which always requires a real user session.

What moves between them

The main flow runs from Salesforce into DATEV. When an Opportunity reaches a closed-won stage or an Order is activated, ml-connector reads it over Change Data Capture and builds an EXTF booking batch with the revenue amount, document number, document date, posting text, tax code, and cost center, then submits it to DATEV Rechnungswesen. Salesforce Account changes become creditor and debtor master rows in DATEV. Any invoice PDF attached in Salesforce is uploaded into DATEV Unternehmen Online against the right document type. DATEV bookings are write-only, so ml-connector never reads posted journal entries back into Salesforce.

How ml-connector handles it

ml-connector stores both credential sets encrypted and runs two unlike auth flows: Salesforce client credentials, where it derives the base URL from the token response instance_url and requests a fresh token when the session expires, and DATEV's interactive Authorization Code flow with PKCE, where the connector refreshes the 15-minute access token using client_id only and never the secret. Salesforce side is event-driven over Change Data Capture, while DATEV side is submit-and-poll: ml-connector posts each EXTF or DXSO job, then backs off and polls the job endpoint until it clears or fails. Salesforce Account numbers map to DATEV creditor and debtor account numbers, and Salesforce records carry the DATEV cost center and SKR GL account so every line lands on a valid account, since DATEV does not expose its chart of accounts over the API. EXTF files are written as NFC-normalized UTF-8 with deterministic filenames, so a retry re-submits cleanly rather than tripping DATEV's duplicate-file error. If a downstream call fails, the record is retried and kept in a full audit trail for replay.

A real-world example

A German professional-services firm of about 120 staff closes project engagements in Salesforce and keeps its books in DATEV through its Steuerberater. Before the integration, the finance team exported won deals and sales orders from Salesforce each week and re-typed the revenue bookings and customer records into DATEV by hand, which delayed invoicing and left the ledger a step behind the pipeline. With DATEV and Salesforce connected, each closed Order produces an EXTF booking in DATEV automatically, the customer becomes a debtor master record, and the invoice PDF lands in DATEV Unternehmen Online ready for the tax advisor. The weekly re-keying step is gone and the books track the pipeline in near real time.

What you can do

  • Turn closed Salesforce Opportunities and activated Orders into EXTF booking batches posted to DATEV Rechnungswesen.
  • Create DATEV creditor and debtor master records from Salesforce Account changes.
  • Upload Salesforce invoice PDFs into DATEV Unternehmen Online against the correct client-specific document type.
  • Bridge Salesforce OAuth client credentials and DATEV's interactive OAuth login with PKCE, refreshing each token before it expires.
  • React to Salesforce changes over Change Data Capture, then submit and poll each DATEV job with retries and a full audit trail.

Questions

Which direction does data move between DATEV and Salesforce?
The main flow is Salesforce into DATEV. Closed deals, activated Orders, and Account changes move from Salesforce into DATEV as booking batches and creditor or debtor master records, and invoice PDFs upload into DATEV Unternehmen Online. DATEV bookings are write-only over the API, so ml-connector does not read posted journal entries back into Salesforce.
How does the integration deal with DATEV having no webhooks?
DATEV does not push any events, so every booking and document import is asynchronous. ml-connector submits each EXTF or DXSO file job, receives a job ID, then backs off and polls the DATEV job endpoint until it reports complete or failed. The Salesforce side stays event-driven through Change Data Capture, so only the DATEV leg relies on polling.
DATEV does not expose its chart of accounts. How do bookings land on the right account?
DATEV cannot return its standard SKR account numbers over the API, so the GL accounts and cost centers are configured in advance and carried on the Salesforce records. ml-connector maps each Salesforce Account to a DATEV creditor or debtor account and stamps every EXTF line with a known GL account, cost center, and tax code so the booking posts to a valid account.

Related integrations

Connect DATEV and Salesforce

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

Get started