ERP CRM integration API projects succeed when the connection is designed as a monitored product, not a one-off script. Choose a simple topology, pick webhooks or polling deliberately, make every write safe to retry, agree who owns each piece of data, and alert on failures so problems surface in minutes, not at month-end.
Why integrations fail quietly
A broken web page is obvious: someone sees it. A broken integration is silent. Orders stop reaching the ERP, a customer update never arrives in the CRM, or a stock level drifts out of date, and nobody notices until a customer complains or the numbers fail to reconcile.
The usual causes are ordinary: a credential expired, the other system changed a field, a request timed out and was never retried, a record failed validation and was skipped, or the same event was processed twice. None of these is exotic. They are predictable, which means you can design for them from the start. This article is the business-facing overview; the developer-level patterns are in CRM and ERP integration patterns for web applications.
Point-to-point or hub
Suppose you have a web shop, a CRM and an ERP. The simplest design connects each pair directly. That is called point-to-point.
| Topology | Good when | Trade-offs |
|---|---|---|
| Point-to-point | Two or three systems, few data flows | Quick to build; connections multiply as systems are added, and each pair has its own mapping and failure modes |
| Hub (integration layer) | Several systems, shared data such as customers and products | One place for mapping, retries and monitoring; extra component to host and maintain |
With three systems, point-to-point means up to three connections; with six, up to fifteen. A hub, whether a small service you own or a commercial integration platform, keeps the count linear. For a small business with two systems, point-to-point is perfectly sensible. Move to a hub when you notice the same mapping logic being copied in several places.
Whatever the topology, decide the system of record for each kind of data: customers may be mastered in the CRM, products and prices in the ERP, orders in the web shop until they are accepted. Without that decision, two systems overwrite each other and nobody knows which value is right.
Webhooks, polling and queues
There are two ways for one system to learn that something changed in another.
- Polling. You ask the other system regularly: anything new since my last check? It is simple, works behind firewalls and gives you control over the pace. The cost is delay, wasted requests, and the need to track what you have already seen.
- Webhooks. The other system calls you when something happens. Updates arrive quickly and without wasted requests. The cost is that you must expose a secure endpoint, verify that the call is genuine, and cope with calls that arrive late, twice or out of order.
Many reliable integrations combine both: webhooks for speed, plus a periodic poll that catches anything a webhook missed. Not every ERP offers webhooks; some only offer scheduled exports or database-level access, so check the capabilities of your actual systems before choosing a pattern.
Put a queue between receiving a message and processing it. The receiver stores the event quickly and answers success; a worker then processes events at its own pace, retrying failures. This protects you when the ERP is slow or briefly offline, because work waits in the queue instead of being lost. Spikes, such as a sale driving many orders at once, are absorbed rather than overwhelming the slowest system.
Idempotency and retries
Networks fail, so every integration will retry. The danger is that a retried request creates a duplicate order or a second invoice. The defence is idempotency: an operation is idempotent if doing it twice has the same result as doing it once.
Practical ways to get there:
- Use an idempotency key. Send a unique identifier with each create request, such as the web shop's order number. The receiving system stores it and, if it sees the same key again, returns the original result instead of creating a second record.
- Prefer upserts. Instead of insert, use update-or-create keyed on a stable external identifier.
- Record what you have processed. Keep a table of event identifiers handled, so a duplicate webhook is recognised and ignored.
- Retry with back-off. Wait progressively longer between attempts and stop after a limit.
- Use a dead-letter list. Messages that keep failing go to a holding area where a person can inspect them, instead of blocking everything or vanishing.
If the other system does not support idempotency keys, you must build the equivalent yourself by looking up an existing record before creating a new one.
Mapping and data quality
Different systems describe the same thing differently. One stores a customer name in a single field, another in two. One uses internal codes for countries, another uses text. Mapping is the documented translation between them, and it deserves a written specification reviewed by someone who understands the business meaning, not only the technology.
- Map every field explicitly, including what happens when a value is missing or unrecognised.
- Agree identifiers early. A shared customer or product number across systems saves endless matching problems later.
- Decide how to handle currencies, tax codes, units of measure, time zones and character sets, including Danish characters such as æ, ø and å.
- Validate on the way in and reject bad records loudly, with a reason, rather than storing them quietly.
- Clean the existing data before you connect systems; an integration happily spreads bad data faster. If this connects to a larger replacement project, see modernizing business software in a Danish SME.
The shape of the connecting interface matters too. A well-designed API makes integrations easier on both sides; our guide to scalable API design covers pagination, errors and versioning that integration builders depend on.
Monitoring and alerting
If silence is the failure mode, monitoring has to make silence visible. Track at least:
- Success and failure counts for each flow, per day and per hour.
- Queue depth and age. A growing or old queue means something is stuck.
- Freshness. When did the last order, customer update or stock sync succeed? An alert if this is older than expected catches silent stops.
- Reconciliation. A scheduled check comparing counts or totals across systems, for example orders in the shop versus orders in the ERP for yesterday.
- Credential and certificate expiry. Many outages are simply an expired key or token.
Alerts must reach a person with the ability and responsibility to act, with enough context to start: which flow, which record, which error. Keep detailed logs with a correlation identifier that follows an order across all the systems, and keep personal data in those logs to the necessary minimum.
Testing with sandbox data
Never test an integration against live ERP data when you can avoid it. Ask each vendor whether they provide a sandbox or test tenant, and what its limits are. Where none exists, build a copy with fictitious records.
- Test the normal path with realistic data: typical orders, customers with several addresses, products with variants.
- Test the awkward cases: missing fields, very long text, special characters, refunds, cancelled orders, partial shipments.
- Test failure deliberately: switch off the receiving system, send the same event twice, deliver events out of order, expire a credential.
- Test volume with a realistic peak, not only a single order.
- Rehearse recovery: how do you replay failed messages, and how do you correct a bad batch?
Document the result, then repeat the tests whenever either system is upgraded, because vendor changes are a common source of regressions.
ERP CRM integration API work: where to start
Start by drawing the systems, naming the owner of each kind of data, and listing the flows between them. For each flow, decide the trigger, the retry rule and the alert. Build the first flow end to end with monitoring before adding a second one. If you want to discuss a specific landscape, our page on software development for Danish companies explains how we work with teams remotely.
Frequently asked questions
What is an idempotent API call?
An idempotent call has the same effect whether it runs once or several times. This matters because integrations retry after failures. Using an idempotency key, such as the shop's order number, lets the receiving system recognise a repeat and return the original result instead of creating a duplicate order or invoice.
Webhooks or polling?
Webhooks deliver changes quickly but require a secure endpoint and handling of duplicate, late or out-of-order calls. Polling is simpler and more controllable but slower and more wasteful. Many reliable integrations combine them: webhooks for speed, plus a periodic poll to catch anything missed. Check what your systems actually support.
How do I monitor an integration?
Track success and failure counts per flow, queue depth and age, and the time since the last successful sync. Add a scheduled reconciliation that compares counts or totals between systems, and watch for expiring credentials. Send alerts to a named person with enough detail to act, such as the flow, record and error.