ml-connector
DATEVPipedrive

DATEV and Pipedrive integration

Pipedrive runs your sales pipeline. DATEV holds the books. Connecting the two lets a won deal in Pipedrive become a booking and an invoice document in DATEV without re-keying. When a deal closes, ml-connector reads its customer, value, currency, and products, then submits the matching debtor and revenue booking to DATEV as a file job and uploads the invoice PDF to DATEV Unternehmen Online. It handles the very different APIs on each side and runs on the cadence your accounting team sets.

How DATEV works

DATEV is not a conventional REST API. Core bookings are submitted as asynchronous file jobs: EXTF CSV files to the on-premise DATEV Rechnungswesen engine, or DXSO XML jobs to the cloud DATEV Unternehmen Online. A small REST surface lists clients and uploads documents such as invoice PDFs. Authentication is OAuth2 Authorization Code with PKCE through login.datev.de, and a real user session is always required because there is no machine-to-machine flow. Access tokens last 900 seconds and must be refreshed. DATEV has no outbound webhooks, so job results are read by polling the job status endpoint, and finalized bookings sent to Rechnungswesen are write-only and cannot be read back.

How Pipedrive works

Pipedrive is a CRM, so it has no native invoices, purchase orders, payments, or GL accounts. It exposes deals, organizations, persons, and products through a REST API, with v2 endpoints using cursor pagination and v1 endpoints using offset pagination. A deal carries value, currency, status of open, won, or lost, and links to a person and organization. Custom field keys come back as opaque hashes that must be resolved from the field definition endpoints. Pipedrive pushes webhooks when records change, with v1 payloads signed by HMAC-SHA256 over the raw body and verified against a signature hash key. Authentication is OAuth2 or a per-user API token.

What moves between them

The flow runs from Pipedrive into DATEV. When a deal reaches won status, ml-connector reads the deal, its organization, and its products from Pipedrive, then writes a debtor record and an outgoing-invoice booking into DATEV as a DXSO XML or EXTF CSV job and uploads the invoice PDF to DATEV Unternehmen Online as a Rechnungsausgang document. Organizations and persons feed DATEV creditor and debtor master data so bookings land on real accounts. DATEV is treated as a write-only accounting sink for finalized bookings, so ml-connector does not pull posted journal entries back into Pipedrive.

How ml-connector handles it

ml-connector stores both credential sets encrypted. On the Pipedrive side it uses OAuth2 or an API token and subscribes to deal webhooks, verifying the HMAC-SHA256 signature on the raw request body and rejecting bad signatures with 401. On the DATEV side it runs the PKCE login flow, keeps the state parameter at least 20 characters, and refreshes the 900-second token by sending only the client id. A won-deal webhook is the trigger; ml-connector resolves Pipedrive custom field hashes to real values, maps deal currency, value, and tax code to the correct SKR debit and credit accounts, and submits the booking as an async job. Because DATEV does not push, it polls the job status endpoint with exponential backoff and jitter until the job completes or fails. Documents are uploaded with a stable GUID so a retry is idempotent, and EXTF filenames are deterministic so DATEV's duplicate check does not reject a safe re-submission. Document types are fetched per client before upload rather than hardcoded, and GL accounts are configured up front because DATEV cannot return the chart of accounts over the API.

A real-world example

A German B2B services firm of about 60 staff runs Pipedrive for sales and uses DATEV through its tax advisor for the books. Before the integration, once a deal was won someone copied the customer name, amount, and tax rate from Pipedrive into a spreadsheet, raised the invoice, and the bookkeeper later keyed the same figures into DATEV, with the invoice PDF emailed around for filing. Mismatched customer names and missed entries surfaced at month-end close. With DATEV and Pipedrive connected, a won deal posts the debtor and revenue booking into DATEV automatically and files the invoice PDF in DATEV Unternehmen Online, so the ledger matches the pipeline and the manual re-keying step is gone.

What you can do

  • Turn a won Pipedrive deal into a DATEV outgoing-invoice booking submitted as a DXSO or EXTF file job.
  • Upload the invoice PDF to DATEV Unternehmen Online as a Rechnungsausgang document with a stable GUID.
  • Keep DATEV debtor master data aligned with Pipedrive organizations and persons.
  • Bridge Pipedrive OAuth2 or API-token auth and DATEV's PKCE login, refreshing the 900-second token automatically.
  • Trigger on signed Pipedrive webhooks, then poll DATEV async jobs with backoff until they post.

Questions

Which direction does data move between DATEV and Pipedrive?
The flow runs from Pipedrive into DATEV. Won deals, organizations, and persons move from Pipedrive into DATEV as bookings, debtor master data, and uploaded invoice documents. Finalized bookings sent to DATEV Rechnungswesen are write-only and cannot be read back, so ml-connector does not pull posted journal entries into Pipedrive.
How does the integration handle DATEV having no webhooks?
DATEV does not push events, so after ml-connector submits an EXTF or DXSO file job it polls the DATEV job status endpoint until the job reports complete or failed. It uses exponential backoff with jitter, since DATEV does not publish processing times and asks that its APIs not be polled at high frequency. The Pipedrive side is event-driven, so a won-deal webhook starts the work.
Can ml-connector look up the right DATEV GL accounts automatically?
No. DATEV does not return the chart of accounts over the API, so the SKR debit and credit accounts and tax codes are configured up front during setup. ml-connector then maps each Pipedrive deal's currency, value, and tax to those accounts, and fetches the client-specific document types before each upload rather than hardcoding them.

Related integrations

Connect DATEV and Pipedrive

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

Get started