Wiki

How do you connect an ERP or CRM and automate it without replacing it?

Automating an ERP or CRM does not usually require replacing it: it is connected to other systems through a REST or SOAP API, webhooks, exchange files or database reads, depending on what the vendor provides. Idempotency, a test environment and minimal rights prevent most incidents.

Published 30 November 2026Last updated: 30 November 2026

Automating without replacing the ERP

An ERP or CRM already in place holds the history, the accounting rules and the team's habits. Automating a task, such as taking in orders, creating invoices or updating contacts, does not usually require replacing it. The automation is built alongside: a program reads and writes through the interfaces the vendor provides, and the ERP remains the system of record for its data, with its numbering, checks and journal.

Replacement becomes a question mainly when the software offers no usable interface, neither an API nor a file import, or is no longer maintained. The following sections describe these interfaces and what to check before connecting to them.

Five ways to connect two systems

Linking an ERP, a CRM or accounting software to another system almost always means choosing among five modes. The choice depends on what the vendor provides more than on what one would prefer.

ModePrincipleWhat to watch
REST APIHTTP requests, usually in JSON, on resources (customers, invoices, items)Authentication, rate limits, version changes
SOAP APIXML messages following a contract (WSDL); common in older softwareHeavier to set up, but the contract is strict
WebhooksThe software calls your address when an event occursA call can be lost or arrive twice
Exchange filesCSV, XML or ISO 20022 files dropped and picked up at set timesDrifting format, encoding, incomplete file
Read-only database accessDirect reading of tables, for reportingSchema changed without notice; never write to it

Writing directly to an ERP's database bypasses its business rules: numbering, VAT checks, journal. Even where it is technically possible, writes go through the interface the vendor provides.

Three systems common in Switzerland

What follows comes from the vendors' public documentation, consulted on 30.11.2026. It changes; the current version is authoritative.

  • bexio publishes a REST API in JSON. Access is through OAuth 2.0 and OpenID Connect (authorization code flow, server-side), or through a personal access token. Rights are granted by scope, for reading or writing (for example contact_show, contact_edit), and the user's own permissions in bexio also apply. Responses report rate limits; a list returns 500 entries by default, 2,000 at most.
  • Abacus offers a REST API accessed by a service user, created in Abacus with a client ID and secret; the token is obtained through OAuth 2.0 (client credentials). The documentation states that a service user can only access Abacus through the interfaces, and that the secret is displayed only once. The older AbaConnect web services are based on SOAP.
  • SAP Business One exposes the Service Layer, an HTTP interface based on OData (versions 3 and 4), with a prior session login. According to SAP, it is built on the same core (DI Core) as the DI API, the long-standing programming interface.

Idempotency: not creating the same invoice twice

A request is idempotent if repeating it has the same effect as running it once. The HTTP standard (RFC 9110) classes GET, PUT and DELETE as idempotent methods, not POST. Yet it is POST that creates an invoice. If the response is lost and the integration retries, the invoice exists twice.

  1. Each object sent carries a stable external reference from the source system.
  2. Before creating, the integration looks up this reference in the target system.
  3. If the API accepts an Idempotency-Key header, it is used; this mechanism is still an IETF draft (version 09 of 21.11.2026), not a standard, and not every API offers it.
  4. Each send is logged with its response, so it can be replayed without duplicates.

Test environments

An integration is developed and tested somewhere other than production: a test tenant, a copy of the company or a trial account, depending on what the vendor provides. The cases to replay before going live are well known: credit notes, foreign currency, different VAT rates, a customer without a complete address, names with accents, a cancelled invoice. Test data is anonymised.

Least privilege

  • One technical user per integration, never a person's account.
  • Only the rights needed: read-only if the integration only reads.
  • Secrets in a vault, not in the code; rotated at a set interval and after someone with access leaves.
  • Data received from the other system is checked like external input. The OWASP API Security Top 10 2023 ranks broken object-level authorisation first, broken authentication second and unsafe consumption of third-party APIs tenth.

What breaks most often

  • Expired token, or a renewal that fails silently.
  • Forgotten pagination: only the first page is read, and nobody notices while volumes stay low.
  • Rate limit reached during a data migration.
  • New API version: a renamed field, a value that has become mandatory.
  • Mappings: VAT codes, charts of accounts, units and countries do not line up from one system to the next.
  • Dates and numbers: time zone, format, rounding to the centime.
  • Lost webhook: hence a periodic reconciliation that compares both systems and flags differences.

Limits

  • Some software has no public API, or charges for it as a separate module; the vendor's contract may forbid direct database access.
  • An integration needs maintenance: every update of either system can break it.
  • Each piece of data needs a master system. Two-way synchronisation without a clear rule produces conflicts.
  • For a few dozen records a month, a well-documented manual import may be enough.

Frequently asked questions

Do you have to replace an ERP to automate it?

Usually not. If the ERP offers an API or a file import, the automation is built alongside and the ERP remains the system of record. Replacement is mainly worth discussing when the software has no usable interface or is no longer maintained.

Should you prefer an API or file exchange?

An API when the vendor offers a documented one: errors are visible immediately. Files remain useful when there is no API, or for standardised exchanges such as ISO 20022.

What is idempotency in an integration?

The property that a repeated send has the same effect as a single one. Without it, a request retried after an outage can create the same invoice twice. It is achieved with an external reference checked before creation, or an Idempotency-Key header if the API offers one.

Can you write directly to an ERP's database?

You should not: direct writes bypass numbering, VAT checks and the journal. Direct database access is limited to reading, where the vendor allows it.

Why a periodic reconciliation if you have webhooks?

Because a webhook can be lost or arrive twice. A regular comparison of both systems catches the differences the events did not carry.

Related articles

Sources