01Decide what owns what
Before any code, write down which system owns each field. Two systems that both believe they own stock levels will produce a reconciliation problem you cannot automate away later.
Everything else becomes a read model — fast, cached, disposable and rebuildable from the owner.
02Never write directly from the storefront
Put a queue between the customer-facing system and the ERP. Orders land immediately, sync retries on failure, and an ERP outage degrades to a delay instead of a lost sale.
Make every write idempotent with a business key so a retried message cannot create a duplicate invoice.
03Sync in the direction of least surprise
Push events, poll only where you must, and reconcile on a schedule to catch drift. A nightly comparison that flags mismatches is cheaper than a customer discovering them.
Keep transformation logic in one integration layer. Business rules scattered across both systems are how integrations become unmaintainable.
04Plan for upgrades
ERPs get upgraded and customisations break. Integrate against documented APIs, keep a small surface area, and test the sync path as part of every upgrade rehearsal.
