ml-connector
DATEVIBM Sterling

DATEV and IBM Sterling integration

DATEV is the accounting and tax backend that German tax advisors and their business clients use for bookkeeping. IBM Sterling B2B Integrator is the EDI gateway that exchanges purchase orders, invoices, and remittance with trading partners. Connecting the two means the EDI invoices and payment advice that land in Sterling mailboxes become posted bookings in DATEV without anyone re-keying them. ml-connector reads the EDI payloads out of Sterling, maps them to the DATEV file formats, and submits them as booking jobs on a schedule you control. Because DATEV cannot return posted journal entries and Sterling is not a financial database, the flow is one direction, from Sterling into DATEV.

How DATEV works

DATEV is on-premise accounting (DATEV Rechnungswesen) with a cloud document layer (DATEV Unternehmen Online). It is not a conventional REST API. The accounting:clients product reads the client list, accounting:documents uploads invoice PDFs and e-invoices to DUO, accounting:extf-files submits finalized bookings as EXTF CSV jobs, and accounting:dxso-jobs submits booking suggestions as DXSO XML jobs. Authentication is OAuth 2.0 Authorization Code with PKCE through login.datev.de, with no machine-to-machine flow, so a tax advisor or client session is always required and access tokens expire after 900 seconds. DATEV has no webhooks; booking and document imports are asynchronous jobs you submit and then poll. Finalized EXTF bookings are write-only and the chart of accounts is not readable through the API.

How IBM Sterling works

IBM Sterling B2B Integrator is EDI middleware, not an ERP, so it holds no invoices or purchase orders as queryable records. Its B2B REST APIs at /B2BAPIs/svc/ manage trading partners, mailboxes, mailbox messages, documents, and workflows, served by an embedded Liberty server on a customer host and port. Business documents such as X12 810 invoices, 850 purchase orders, 856 ship notices, and 820 remittance flow as binary or text EDI payloads inside mailbox messages, retrieved with the mailbox extract endpoint. Authentication is HTTP Basic Auth with a dedicated non-super-user account, or OAuth2 client credentials on version 6.2.2 and later, both against the customer URL. There is no shared cloud endpoint and no outbound webhook, so new messages are found by polling the mailbox on a schedule.

What moves between them

The flow runs one direction, from IBM Sterling into DATEV. ml-connector polls the Sterling mailboxes that receive inbound supplier invoices (X12 810 or EDIFACT INVOIC) and remittance advice (X12 820 or REMADV), extracts each EDI payload, and translates it into a DATEV booking. Finalized bookings are written to DATEV Rechnungswesen as EXTF CSV import jobs, while booking suggestions that still need tax-advisor review go to DATEV Unternehmen Online as DXSO XML jobs. The original invoice document is uploaded to DUO through the documents API so the PDF sits next to the booking. Cadence follows your Sterling poll interval, typically every one to five minutes, with each DATEV job polled to completion. Nothing flows back to Sterling, because DATEV cannot return posted journal entries and Sterling stores no financial state.

How ml-connector handles it

ml-connector stores both credential sets encrypted. On the DATEV side it runs the OAuth 2.0 Authorization Code plus PKCE flow once with the tax advisor, then refreshes the 15-minute access token automatically, sending client_id only on refresh and the X-DATEV-Client-Id header on every call. On the Sterling side it accepts the customer host and Liberty port and authenticates with the dedicated non-super-user Basic Auth account or OAuth2 client credentials, since there is no shared address. Because neither system pushes, it is poll-to-poll: a scheduled poll of the Sterling mailbox messages endpoint finds new EDI by createdDate, extracts the payload, and parses the 810 or 820 segments into EXTF or DXSO fields, mapping the EDI invoice number to Belegfeld 1, the amount and S or H indicator to Umsatz, and the document date to Belegdatum. Cost centers and GL accounts are configured up front, because DATEV will not return its chart of accounts. EXTF files use UTF-8 with precomposed (NFC) characters and a whitelisted-character filename, or DATEV silently rejects them. Each DATEV import is async, so ml-connector submits the job, then polls the job status with exponential backoff and jitter from about 5 seconds up to 60. DATEV detects duplicate EXTF files by filename plus document type and returns error DCO01253, and Sterling has no idempotency header, so ml-connector builds a deterministic filename from the Sterling message id and a BullMQ jobId, which makes a re-read mailbox message retry-safe instead of a second booking. Failed jobs carry a full audit trail and can be replayed.

A real-world example

A mid-sized German auto-parts supplier with about 300 staff books its finances in DATEV through an external Steuerberater and exchanges orders and invoices with its OEM customers over EDI through an on-premise IBM Sterling B2B Integrator. Before the integration, inbound supplier invoices arrived in Sterling mailboxes as 810 documents, and a clerk opened each one, typed the header and amounts into DATEV by hand, then forwarded the PDF to the tax advisor, which left invoices sitting for days and produced keying mistakes the advisor had to correct at month-end. With DATEV and IBM Sterling connected, each 810 that lands in the mailbox is parsed and posted into DATEV as a booking suggestion within the poll window, the invoice PDF is uploaded to DUO automatically, and remittance advice posts the same way. The clerk reviews instead of re-keys, invoices are current, and the advisor closes the month against clean data.

What you can do

  • Poll IBM Sterling mailboxes for inbound 810 invoices and 820 remittance and post them into DATEV as bookings.
  • Submit finalized bookings to DATEV Rechnungswesen as EXTF CSV jobs and review items to DUO as DXSO suggestions.
  • Upload the source invoice PDF to DATEV Unternehmen Online alongside each booking.
  • Bridge DATEV interactive OAuth2 with PKCE and 15-minute tokens to IBM Sterling Basic Auth or OAuth2 on a customer URL.
  • Dedupe re-read mailbox messages with deterministic EXTF filenames and a jobId, with retries and a full audit trail.

Questions

Which direction does data move between DATEV and IBM Sterling?
It moves one direction, from IBM Sterling into DATEV. EDI invoices and remittance that arrive in Sterling mailboxes are parsed and submitted to DATEV as EXTF bookings or DXSO suggestions, and the invoice PDF goes to DATEV Unternehmen Online. DATEV cannot return posted journal entries and Sterling holds no financial records, so nothing flows back.
How does the integration deal with both systems being pull-only?
Neither side pushes, so ml-connector runs poll-to-poll. It polls the Sterling mailbox messages endpoint on a schedule, typically every one to five minutes, to find new EDI by createdDate, and after submitting each DATEV import job it polls the DATEV job status with exponential backoff and jitter from about 5 up to 60 seconds, since DATEV does not document processing time.
What stops a re-read EDI document from being booked twice in DATEV?
DATEV detects duplicate EXTF files by filename plus document type and returns error DCO01253, but Sterling has no idempotency key. ml-connector builds a deterministic EXTF filename from the Sterling mailbox message id and pairs it with a BullMQ jobId, so re-reading the same mailbox message resubmits the identical file and DATEV rejects the duplicate instead of creating a second booking.

Related integrations

Connect DATEV and IBM Sterling

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

Get started