Why website and ERP integrations fail after launch
A demonstration can show an order reaching the ERP and a stock figure changing on the website. It takes a production-like test to see what happens when a timeout creates two sales orders for one payment or a renamed product code interrupts a price update. Reconcile the results as well. In one illustrative check, the website might show 214 orders for Tuesday when the ERP shows 211.
Before development starts, agree which system can change each field, how the receiving system recognizes a duplicate request, and who checks that the records still agree. The same decisions apply whether you use Odoo, Zoho Books, SAP Business One, Dynamics 365 Business Central, or an ERP built for your business.
The path of one web order into the ERP
- Customer paysThe website records the order and the payment reference
- QueueThe order waits in a durable queue with a unique key
- Map and validateCodes, taxes and addresses are converted for the ERP
- Send with the order keyDuplicate protection ensures the ERP creates one sales order
- Confirm and logThe ERP order number is stored next to the web order
Choose the connection route before the mapping details
With a direct connection, the website or a small integration service calls the ERP's documented API. Middleware sits between the two systems and handles queues, retries, and data transformations. In a scheduled file exchange, one system exports a file and the other imports it at an agreed time.
A direct API connection is usually the right starting point when the ERP has a stable, documented API and only one or two record types move. It has the fewest moving parts. Its limits come from the ERP vendor: request quotas, token lifetimes and planned changes to the API itself. Odoo, for example, is moving integrations from its older XML-RPC and JSON-RPC endpoints to a newer JSON-2 API, and Zoho Books enforces per-minute and per-day request limits by plan. Our guides to Odoo integration with the JSON-2 API and Zoho Books and Zoho CRM API limits cover those constraints in detail.
Middleware can justify its cost when staff need to inspect and replay failed messages or when the same order must reach the ERP, the warehouse system, and a delivery partner. Older or heavily customized ERPs often rely on file exchange. Check whether the import applies the same business rules as the API. A file-based integration needs explicit import checks and a reconciliation report that can show what was missed.
Record the approach you chose and why. When the ERP is upgraded or replaced, the next team needs to know what it can safely change. If the integration must issue or receive structured invoices, read our guide to e-invoicing and ERP integration before finalizing the data model. Confirm the applicable fields, formats and delivery requirements with finance and the receiving party.
Start with a field ownership table
For each field that moves between the website and the ERP, document where the value comes from, how it changes across systems, and which system can edit it. Finance and operations can review those decisions before they become part of the code.
Build the table with the people who use each system. Finance knows which tax codes the ERP expects. Operations knows that the warehouse reads the delivery note field and ignores the order comment. Sales knows that one customer can have three delivery addresses but only one billing account.
| Web field | ERP field | Owner | Rule |
|---|---|---|---|
| Order number | Customer reference | Website | Copied as text, never reused |
| SKU | Item code | ERP | Lookup table, reject unknown codes |
| Unit price | Unit price | ERP | Website shows the ERP price, never sends its own |
| VAT | Tax code | ERP | Mapped from the delivery country and product type |
| Delivery note | Shipping instructions | Website | Trimmed to the ERP field length |
The "Owner" column matters most. When both systems can edit the same field, you get update loops and silent overwrites. Give each field one owner. The other system reads it and does not write it back. If a field truly needs two-way editing, such as a customer phone number, define which change wins and record the timestamp of every change so the rule can be applied.
Decide what happens when a request is sent twice
An ERP can create a sales order even when its response never reaches the integration. When that happens, the integration knows that it timed out. It still has to find out whether the order exists before it sends the request again.
HTTP itself only promises safe repetition for some methods. RFC 9110 defines PUT and DELETE as idempotent, meaning that repeating the same request has the same intended effect as sending it once. POST, which most ERP APIs use to create documents, carries no such promise. The fix is an idempotency key: a unique value, such as the web order ID, sent with the create request so the receiving system can recognize a repeat and return the original result instead of creating a new record.
Payment providers use this pattern widely. Stripe's API, for example, accepts an Idempotency-Key header and returns the saved result of the first request when the same key arrives again within its retention window. Many ERP APIs do not offer a header like this, so the integration has to build the same protection in one of two ways:
- Use a natural unique field in the ERP. Write the web order number into a field the ERP can check for duplicates, such as the customer reference, and look it up before creating the order. Ask the ERP partner whether the lookup and the create can happen without a gap that lets two requests through at the same time.
- Keep a ledger in the integration layer. Record each web order with its state (waiting, sent, confirmed, failed) and the ERP document number once known. Before sending, check the ledger. After a timeout, query the ERP by the reference before retrying.
After a timeout, should the integration resend the order?
The ERP did not answer within the timeout. What next?
- The ERP API supports idempotency keysResend with the same key. The ERP returns the original sales order if it already exists.
- The ERP can search by customer referenceSearch for the web order number first. Create the order only if nothing is found.
- Neither is availableHold the order for review and alert a person. Do not resend automatically.
Retry with increasing delays, then stop
Retry a temporary failure automatically, with a delay and a limit on attempts. An integration that retries many orders immediately can add to the load just as a busy ERP is recovering.
A common approach is exponential backoff with jitter, described in detail on the AWS Architecture Blog. Each retry waits longer than the last (for example 2, 4, 8 and 16 seconds), and a random element spreads the retries out so that hundreds of queued orders do not hit the ERP at the same moment. After a fixed number of attempts, the order moves to a failed state and someone is told.
Retry a timeout or a "service unavailable" response after checking whether the first request went through. Send an invalid tax code or an unknown item code to the person who can correct it. The same order will fail again until that person fixes the data.
| Error type | Example | Retry? | Who acts |
|---|---|---|---|
| Temporary | Timeout, 503, rate limit | Yes, with backoff | Nobody, unless it persists |
| Data | Unknown SKU, invalid tax code | No | Operations or catalog owner |
| Authentication | Expired token, revoked key | No | Integration owner |
| Business rule | Customer on credit hold | No | Finance or sales |
Keep orders moving when the ERP is unavailable
A checkout that waits for the ERP can stop taking orders during scheduled maintenance. Have the website accept the order, record it in a durable queue, and confirm it to the customer. The integration can then send it to the ERP once the ERP is available.
This design moves one question to the business: what can the website promise while the ERP is unreachable? Stock is the usual concern. If stock levels sync every 15 minutes, the website can oversell during an outage. Some businesses accept that risk for a short period and handle the rare oversell manually. Others reserve a safety margin on the website. Write the agreed rule down, because the developer cannot decide it for you.
Prove every day that both systems agree
Use a daily reconciliation report to compare what the website accepted with what the ERP recorded. The integration logs can then help explain a missing order, a duplicate, or a difference in the totals.
A daily reconciliation report should check
- Order countsWeb orders for the day against ERP sales orders with a web reference
- Missing ordersWeb orders with no ERP document number after the cut-off time
- DuplicatesERP sales orders that share one web order reference
- AmountsOrder totals, tax and shipping on both sides, within an agreed tolerance
- PaymentsPayments taken with no matching ERP order, and the reverse
Agree the tolerance before go-live. Rounding rules differ between systems, so a total may differ by one fil or one cent on some orders. Decide whether that difference is acceptable or must be investigated. Store the report results so you can show, months later, that the systems were checked every day.
Test the failures, not only the happy path
Before launch, use a test ERP company or a sandbox to see how the integration recovers from each of these failures. Write down what you expect and compare it with what happens.
- Send the same order twice with the same key and confirm one ERP order exists.
- Cut the connection after the ERP receives a request but before the response arrives.
- Send an order with an item code that does not exist in the ERP.
- Expire the API credentials and confirm the alert reaches the integration owner.
- Queue 200 orders while the ERP is offline, then bring it back and watch the backlog clear without duplicates.
- Change a price in the ERP and measure how long the website takes to show it.
Each test should have an expected result written before it runs. "It worked" is not a result. "One sales order created, reference W-10482, second request returned the same document number" is.
What to agree before development starts
Agree on these decisions in the first week. Include the ERP partner if the system is customized, since the partner may need to confirm which fields, credentials, and duplicate checks are available.
Decisions to settle before building
| Decision | Typical owner | Why it matters |
|---|---|---|
| Field ownership and mapping | Finance and operations | Prevents overwrites and update loops |
| Duplicate protection method | ERP partner and developer | Decides whether retries are safe |
| Sync frequency for stock and prices | Operations | Sets the oversell risk during delays |
| Reconciliation tolerance and owner | Finance | Defines when a difference needs action |
| Credentials, environments and access | IT or integration owner | Keeps test data out of production |
If the integration replaces an older one, or moves historical orders into a new ERP, plan that move separately. Our data migration plan guide covers mapping, cleansing, reconciliation and a cutover you can roll back.
At handover, ask the team to show that an order is recorded once after a timeout, that prices agree across systems, and that the daily report identifies the owner of each difference. Our API and system integration service starts with the field ownership table and these checks. You can also tell us about your systems.
Questions buyers ask
How long does a website and ERP integration take?
It depends on how many record types move between the systems and how clean the existing data is. A single order flow with a documented ERP API can often be scoped in days and built in a few weeks. Product, price, stock and customer sync together take longer, mainly because of mapping decisions and testing.
Should the website or the ERP be the source of truth?
Decide this for each field, not for the whole system. The ERP usually owns prices, stock and invoices. The website often owns the customer's delivery notes and marketing consent. Write the owner of each field into the mapping document.
Can we integrate without an official ERP API?
Sometimes, through scheduled file exchange or a database view provided by the ERP vendor or partner. These routes need stricter validation and reconciliation because they skip the business rules an API would apply. Writing directly into ERP tables is rarely supported and can void vendor support.
What happens when the ERP is down?
Orders should wait in a durable queue on the integration side and be retried with increasing delays. Customers can still place orders, and staff can see which orders are waiting. Nothing should be lost or created twice when the ERP comes back.