Webshop to ERP Integration: Real-Time API or Batch Sync? — Odoo & ERP article by Rui Codex

For most webshop to ERP integration projects, the answer depends on the data. Orders, stock reservations and payment status usually need near real-time API calls, because stale values cause overselling and failed fulfilment. Product catalogue syncs, invoice exports and reporting feeds often work well as scheduled batches. A hybrid design can use both where each one fits.

Key takeaways

  • Real-time API calls suit data where a delay causes a wrong customer promise, such as stock and order status.
  • Scheduled batch sync suits high-volume data that changes slowly or is read by people rather than by the checkout.
  • Every real-time design needs retry, queueing and monitoring, because the ERP can be unavailable at the moment of a sale.
  • Most projects combine both patterns and decide per data flow, not per system.
  • The right choice is made by listing each data flow with its tolerable delay and its failure cost before any code is written.

What is the difference between real-time and batch sync?

Real-time integration sends each change from the webshop to the ERP through an API call as soon as it happens. Batch sync collects changes over a period and transfers them together on a schedule, such as every fifteen minutes or once each night.

The difference is not only speed. A real-time call is a single request with a single outcome that the shop must handle immediately. A batch job is a set of records processed in one run, where one bad record can stop or slow the whole run if the job is not designed to skip and report it.

What changes in the design

Real-time designs put the weight on error handling at the moment of the transaction. Batch designs put the weight on record-level reconciliation, change detection and the window in which data can be wrong.

When does real-time API integration make sense?

Real-time API integration makes sense when a delayed value would lead to a wrong promise to the customer or a wrong decision in the warehouse. Stock availability at checkout, order creation and payment status are the usual cases. If the shop sells the last unit twice because the ERP updated an hour later, the cost is a cancellation, a refund and a damaged reputation.

Real-time also helps when a process must trigger the next step immediately, such as sending an order to a picking system. For integrations of this kind, the Rui Codex ERP and CRM integration service covers the mapping and the API design needed on both sides.

Tip: Ask what the shop shows the customer during the delay. If the honest answer is a promise that might be wrong, that flow needs a synchronous check or a reservation step.

When is scheduled batch sync the better choice?

Scheduled batch sync is the better choice when the data is high in volume, changes in predictable blocks, or is needed by people in the ERP rather than by the checkout. Product catalogues, price lists, invoice exports and daily sales summaries fit this pattern well.

A batch job is also easier to operate. It can run at quiet hours, be re-run for a date range after a failure, and produce a report that a person can read. Real-time flows rarely offer that kind of simple replay.

Practical advantages of batching

  • A failed run can be repeated for the same time window without duplicating records, if each record has a stable identifier.
  • Load on the ERP is predictable, which matters for systems that were not sized for constant external traffic.
  • Reconciliation is simpler, because totals can be compared between the two systems after each run.

How do you decide per data flow?

You decide per data flow by checking three questions: how long can this value be wrong, what does a wrong value cost, and how many records move per hour. The answers place each flow on one side or the other, and most projects end up with several flows on each side.

  1. List every data flow between the webshop and the ERP, including returns and refunds.
  2. For each flow, write down the maximum tolerable delay in plain words, such as seconds for stock or hours for invoices.
  3. Estimate the failure cost, meaning what the business does when the value is wrong.
  4. Choose real-time where the delay is intolerable and batch where it is not, then review the list with operations staff.
Tip: Do not pick the pattern before the delay tolerance is agreed with the people who handle returns and customer service. Their answer usually changes the design more than the developers expect.

Where does each approach fail?

Real-time integration fails most often when the ERP is slow or unavailable at the moment of a sale. Without a queue and a retry policy, the webshop either blocks the customer or loses the order, and neither outcome is acceptable. Rate limits on the ERP side can also turn a busy sales day into a stream of rejected calls.

Batch sync fails in quieter ways. A job that silently skips records, a changed field format that breaks the mapping, or a run that overlaps with the previous one can leave the two systems apart for days before anyone notices. Batch designs need a reconciliation check and an alert, not only a schedule.

Failure checklist

  • Every real-time call has a timeout, a retry limit and a dead-letter queue for failed messages.
  • Every batch run logs the number of records read, written and rejected, and alerts when rejections exceed a threshold.
  • Each record carries a stable external identifier so that repeated sends do not create duplicates.
  • Someone owns the failed-message queue and checks it on a fixed routine.

Hypothetical examples of webshop to ERP flows

Here are two hypothetical scenarios:

In the first scenario, a fashion retailer sends stock reservations to the ERP through a real-time call at checkout, and sends product descriptions as a nightly batch. When the ERP is briefly unavailable, the checkout queues the reservation, shows the customer a clear message, and retries within minutes. The catalogue batch simply runs the following night with no effect on sales.

In the second scenario, a company selling industrial spare parts syncs price lists in a batch each morning, but sends order confirmations and shipping status in real time. The batch is re-run for the previous day when a price file arrives late, and the real-time flows keep the customer informed. Neither scenario is based on a real client; they illustrate how the same shop can use both patterns.

How do you implement a hybrid design safely?

A hybrid design is safe when both paths share the same identifiers, mapping rules and monitoring. Keep one canonical mapping layer so that a field change is made once and applies to both the real-time calls and the batch jobs.

Start with the flows that carry the highest failure cost, test them under load and with the ERP offline, and only then add the batch flows. For a broader view of how these pieces fit into a system landscape, the Rui Codex system integration service page describes the typical scope, and the blog article on maximising business efficiency through ERP and CRM integration looks at the business side of the same decisions.

Tip: Write the reconciliation query before the sync code. If you cannot state how you will detect a missing order, you are not ready to go live.

Rui Codex is led by a founder with 200+ projects delivered, and published work is listed on the case studies page. Those pages show the scope of delivered projects and are the best place to check how similar integrations were handled.

Frequently Asked Questions

Is real-time integration always better than batch sync?

No, real-time integration is not always better. It is the right choice only for data where a delay causes a wrong customer promise or a wrong operational decision. For slowly changing or high-volume data, a scheduled batch is simpler to run, easier to replay and usually cheaper to operate.

Can a webshop use both approaches with the same ERP?

Yes, a webshop can use both approaches with the same ERP, and this is a common design. The usual pattern is real-time calls for orders, stock and payment status, with batch jobs for catalogue, price and reporting data. Both paths should share identifiers and mapping rules so that they stay consistent.

What happens if the ERP is down during a real-time sale?

If the ERP is down during a real-time sale, the integration should queue the message, retry it and inform the customer honestly. Without a queue, the order can be lost or the checkout can fail. A dead-letter queue and an alert let the team recover the failed messages once the ERP is available again.

How do I know if a batch sync has missed records?

You know a batch sync has missed records by reconciling counts and totals between the webshop and the ERP after each run. Each run should log records read, written and rejected, and alert when rejections exceed a set threshold. Stable external identifiers make it possible to find the exact records that did not arrive.

Who should decide which data flows are real-time?

The decision should be made jointly by the people who own the business process and the engineers who build the integration. Operations and customer service staff know how long a wrong value can be tolerated, while engineers know the cost of each pattern. Agreeing on the tolerable delay for each flow turns a technical question into a clear business rule.

Conclusion

Webshop to ERP integration rarely has a single answer, because the right pattern depends on each data flow. Real-time API calls protect the customer promise for stock, orders and payments, while scheduled batches handle high-volume and slowly changing data with less operational strain. The safest designs define tolerable delay and failure cost first, then build queues, retries and reconciliation around each choice. If you want to review your data flows before building anything, request a project consultation at Rui Codex and we will go through them with you.

Tags: webshop to ERP integration real-time API batch sync API integration workflow automation system integration ERP integration e-commerce

Need Help Implementing This?

Our team can help you put these insights into practice. From AI automation to custom software development, we build solutions that deliver real results.

Send a project request