ERPNext ↔ Shopify Integration - replay-safe commerce sync
Orders, customers, inventory, and fulfillment status synchronized with idempotency, evidence trails, and operational controls. Designed to survive failure - not to ‘usually work’.
Why Shopify-ERP integrations usually fail in production
The hard part is not syncing once. The hard part is staying correct after retries, webhooks, partial failures, and conflicting edits.
Most integrations treat retries as a ‘try again’. In commerce, that creates duplicate orders, duplicate customers, duplicate stock moves, and reconciliation chaos.
- Webhooks can be delivered more than once - duplicates happen unless you design for it.
- Jobs can crash mid-way - partial writes cause drift unless you can safely replay.
- Retry without idempotency is a correctness bug, not a feature.
Without explicit mapping rules and guardrails, one side slowly becomes ‘truth’ by accident, and teams stop trusting the data.
- Inventory directionality is often unclear and becomes a source of conflict.
- Edits made in one system get overwritten by late webhooks (‘echo’ effects).
- Failures hide in background jobs - teams only discover issues when customers complain.
Make it replay-safe, observable, and provable
This integration is engineered as an operational system. Every sync is traceable, every retry is safe, and failures are visible with controlled actions.
Webhooks and queued jobs are processed with deterministic keys and “already applied” checks, so replay does not create duplicates.
Every inbound/outbound action records what was received/sent, what was changed, and the final status - for audits and debugging.
Failures are not buried in logs. They are surfaced, categorized, and made actionable with safe retry/requeue controls.
What syncs (and how we keep it correct)
We intentionally avoid vague “it syncs everything” claims. These are the rails that keep commerce operable.
Orders are created/updated in ERPNext with replay-safe mapping. Each order update is tracked as an event with status and evidence.
- Replay-safe order creation/updates (no duplicates on re-delivery).
- State mapping rules (paid, fulfilled, refunded, canceled) are explicit - not guessed.
- Failure logs are attached to the exact order + event that caused them.
Customers are linked using stable identifiers and sync logs, so “same customer” remains the same customer even after retries and edits.
- Deterministic mapping to avoid duplicate Customer/Contact creation.
- Update rules that prevent overwriting ERPNext authoritative fields silently.
- Full event trail for each customer change.
Inventory is where most integrations go to die. We enforce directionality rules, echo protection, and safe mapping across locations.
- Clear directionality: outbound stock changes are tied to ERPNext events (e.g. deliveries, reconciliations).
- Echo protection: ignore Shopify webhooks triggered by our own recent outbound pushes.
- Location mapping rules so the right quantity updates the right place.
A production integration needs an operator interface: what failed, why it failed, what is safe to retry, and what should never be retried.
- Failure categories with actionable context (not raw tracebacks).
- Retry/requeue controls designed to be replay-safe.
- Evidence logs per webhook/event for investigations and audits.
Hard truths we handle explicitly
These are common production issues that the integration treats as first-class problems, not edge cases.
Stock movement in ERPNext can require valuation rules. We design the flow so your inventory stays correct without breaking posting.
Webhooks are verified to ensure requests are genuinely from Shopify before any changes are applied.
Queue floods and API limits are handled with rate limiting and safe job design, so failures don’t cascade.
How we implement without breaking your store
Commerce systems don’t tolerate ‘big bang’ changes. We roll out with guardrails, staged sync, and verification.
We set directionality rules, location mapping, identifiers, and evidence logging before turning on live sync.
- Connect Shopify + verify webhook authenticity.
- Define authoritative sources per field (Shopify vs ERPNext).
- Set up location mapping and product linking rules.
Turn on live traffic with dashboards, alerts, and controlled retries so teams can operate it confidently.
- Enable order/customer flows with replay-safe processing.
- Enable inventory flow with echo protection and guardrails.
- Expose failures with safe operator actions (retry/requeue).
Want a Shopify integration you can actually operate?
We’ll review your store workflow (orders, stock, fulfillment), your ERPNext configuration, and the failure modes you’ve already seen - then propose a rollout that is observable, replay-safe, and audit-ready.