Connecting ERP, CRM and your online shop: the quiet mistakes that cost the most
Integrations rarely fail on day one. They fail in month four, when an order appears twice, a price is stale and nobody can say which system is right.
The integration that worked perfectly in the demo
A mid-sized distributor connects its online shop to its ERP. In testing, an order placed on the website appears in the ERP within seconds, stock levels flow back, everyone is delighted. The project closes.
In month four, finance notices at closing that the shop reports more orders than the ERP. Digging in takes two days. A network blip made the shop resend an order notification, the ERP dutifully created the order twice, and the warehouse picked and shipped it twice. Nobody was warned, because technically nothing failed.
Integrations do not break loudly. They drift, quietly, until somebody has to reconcile the books by hand.
The mistakes behind this story are not exotic. They are the same few, repeated across almost every integration project. Knowing them in advance is cheaper than discovering them at month-end.
Decide who owns each piece of data
The first question is not 'how do we connect these systems' but 'for each piece of data, which system is the boss?'. A customer's billing address, a product price, the stock on hand, the status of an order: each needs exactly one owner.
When two systems are both allowed to edit the same field, they eventually start overwriting each other. A sales rep corrects a phone number in the CRM, the nightly sync from the ERP restores the old one, and the rep concludes the CRM is broken. Nobody trusts either system, so people start keeping their own spreadsheets.
- Write the ownership down in a simple table: field, owner system, who may read, who may request a change.
- Everyone else treats that field as read-only, or sends a change request to the owner rather than editing a copy.
- If you truly need two-way editing, define a conflict rule up front, such as 'latest change wins' or 'ERP wins', and log every conflict.
Assume every message arrives twice
Networks fail, services restart and senders retry. Most messaging between systems works on an 'at least once' basis: you will sometimes receive the same message more than once, and occasionally out of order. This is not a bug to be removed. It is a property to be designed around.
The standard answer is idempotency: processing the same message twice has the same effect as processing it once. In practice this means every message carries a unique key, such as the order number plus a version, and the receiver records the keys it has handled. A repeat is recognised and quietly ignored.
Ordering needs the same care. If an 'order shipped' event overtakes an 'order created' event, a naive system rejects it or creates garbage. Carry a version or timestamp on every update and discard anything older than what you already have.
Plan for the day the other system is down
Every system you connect will be unavailable at some point: a maintenance window, a vendor outage, a certificate that expired over the weekend. The question is whether your business keeps running while it is.
A robust design places a queue between the systems. The shop drops the order on the queue and carries on selling. The ERP picks it up when it is back. Failures are retried with growing delays, and messages that keep failing go to a separate holding area where a person can look at them, instead of blocking everything behind them.
Add a nightly reconciliation as a safety net: a small job that compares counts and totals between systems and flags differences. It will catch the problems that no retry logic anticipated, usually within a day instead of at month-end.
Make it visible to non-engineers
Most integration failures are discovered by business users, because nobody built a way for anyone else to see them. A good integration has a simple status view that answers the questions people actually ask: did order 10432 reach the ERP? When? If not, why?
- Give every message a correlation ID that follows it across systems, so one search finds its whole journey.
- Write error messages in business language: 'Product code X not found in the ERP', not 'HTTP 422'.
- Decide in advance who is alerted for which failure, and what they should do about it.
These are small investments. They are also the difference between an integration that is trusted and one that is quietly worked around.
Start with one flow, end to end
The temptation is to connect everything at once. A better path is to take one flow, such as order to invoice, and make it work completely: ownership clear, retries safe, failures visible, reconciliation running. Once that flow is boring, copy the pattern to the next one.
That is slower for the first month and much faster for the following year, because every later integration starts from a proven pattern instead of a fresh set of surprises.
Keep reading
Before the dashboard: what a mid-sized company should build first in its data platform
Everyone wants dashboards and AI. Few want to hear that both depend on a boring layer underneath. Here is the order that keeps a data project from collapsing under its own weight.
Read articleYour RAG demo is brilliant. Your data is why production won't be.
The demo answered every question. Then it went live and quoted last year's price with total confidence. The model was fine. The documents were the problem.
Read article