the erp is the system the business runs on: stock, prices, orders, invoices, accounting. the shop is where customers meet that data. connecting them looks like a mapping exercise. it is really a decision about who owns what, and what happens when the two disagree.
decide which system wins, field by field
make a table with every shared field: product name, description, price, tax class, stock, customer address, order status. next to each one, write which system owns it and which only displays it. typically the erp owns stock, prices and invoices, the shop owns customer-facing content and the cart, and order status moves back and forth with a clear rule.
without this table, both systems edit the same field and the last write wins. that is how a price fixed in the erp gets overwritten by the shop an hour later.
stock sync: how fresh is fresh enough
a nightly stock export is simple and wrong by noon. near real-time sync is accurate and needs more engineering. choose by risk: for fast-moving or limited items, sync on every change; for slow catalog items, every few minutes or hourly is fine.
also decide what "available" means. physical stock, minus reserved orders, minus a safety buffer, per warehouse. the shop should show the number the erp calls available to sell, not raw quantity on hand.
order export and status write-back
orders flow from the shop to the erp, and the erp sends back status, invoice numbers and shipment data. agree on the order format in writing, including tax, discounts, shipping lines and payment reference. make the import idempotent with the shop's order id as the key, so a retry cannot create a duplicate sales order.
build for failure. what happens when the erp is down for maintenance, or rejects an order because a product code does not exist? failed orders need a queue, an alert and a person who owns fixing them. silent failures turn into customers who paid for orders nobody fulfills.
prices, tax and b2b rules
price lists, customer-specific prices, vat rules and currencies often live in the erp. decide whether the shop copies them or asks the erp at runtime. copies are fast and can go stale. runtime calls are accurate and make checkout depend on erp uptime.
direct, middleware or ipaas
a point-to-point connector is cheapest for one shop and one erp. as systems multiply, a middleware layer or integration platform keeps mapping, retries and monitoring in one place. the patterns are well known, and it is worth reading them before designing your own.
example tools and docs
- sap business accelerator hub ↗ - api catalog for sap s/4hana and related products
- odoo external api documentation ↗ - reading and writing odoo data from outside
- microsoft dynamics 365 business central documentation ↗ - erp for mid-size businesses, with developer and api guides
- enterprise integration patterns ↗ - the reference catalog for messaging and integration design