Shopify and ERPNext, kept in step

A South African online retailerIn production

Two-way sync between a Shopify store and ERPNext, with each system owning the data it is best at.

The challenge

When a webshop and an ERP drift apart, stock, prices, orders and refunds get keyed in twice, and a naive sync overwrites one system's data with the other's.

What we built

  • Product sync where ERPNext owns SKU, cost, price, weight and tax, and Shopify owns titles, descriptions, images and tags
  • Shopify orders arrive as Sales Orders; only paid orders are submitted
  • Refunds become Credit Notes; a submitted Delivery Note fulfils the Shopify order and raises the invoice
  • Stock pushed every 5 minutes, prices every 15, with optional hiding of out-of-stock items
  • Item variants exported as grouped Shopify products, including families of more than 100 variants
  • Failed messages are kept and retried, with a sync log, dashboard and hourly reconciliation

How it works

Shopify stops sending updates if they aren't acknowledged within 5 seconds. A small separate service checks that each update really came from Shopify, acknowledges it in under 100 ms and hands it to ERPNext, which processes it in the background. Outbound changes come from ERPNext's own document events and schedules. Loops and duplicate events are detected and skipped.

  1. Shopify
  2. Receiving service
  3. ERPNext queue
  4. ERPNext

By the numbers

  • Updates from Shopify acknowledged in under 100 ms
  • Stock every 5 min, prices every 15 min, reconciliation hourly
  • Up to 5 retries with back-off

Request a licence for Shopify and ERPNext, kept in step

Have a system that doesn't quite fit?

Tell us what you need it to do. We'll scope it with you.

Plan your ERPNext project