Skip to content

Integrations and automation

How to integrate your ERP, CRM and online store so your systems talk to each other

When the ERP, the CRM and the online store do not communicate, someone ends up copying orders, customers and stock by hand. This guide explains how to design an integration that works: which data to move, which system is the master for each, how to sync it and what to do when something fails.

The Devecu team · · 9 min read

Why your systems do not talk to each other (and what it costs you)

Each tool arrived at the company at a different moment to solve a different problem: the ERP for invoicing and inventory, the CRM for the sales team, the online store for selling on the internet. Each one keeps its own version of customers, products and orders.

The result is easy to spot:

  • An order from the store is retyped into the ERP.
  • Stock on the website does not match the warehouse and sold-out products get sold.
  • The sales team does not know what a customer bought because that information is in another system.
  • Every report requires exporting files from three places and cross-referencing them by hand.

Integrating is not just "connecting through an API". It is deciding how your business information flows and making that flow reliable.

Step 1: decide which system is the master for each piece of data

It is the most important decision and the one most often skipped. For each entity, define a source of truth: the single system where that data is created or modified. The others only read it or receive copies.

A common setup:

DataUsual source of truthWho receives it
Products, prices and stockERPOnline store, CRM
Customers (commercial data)CRMERP, online store
Web ordersOnline store (origin) → ERP (management)CRM
InvoicesERP or invoicing systemCRM, customer
Shipping statusERP or logistics systemOnline store, customer

There is no single correct table for every company; what matters is that one exists and everyone respects it. If two systems can modify the same data, sooner or later you will have conflicts nobody knows how to resolve.

Step 2: map the data between systems

Each system names and structures things its own way. You need to define explicitly:

  • Identifiers: how customer 1234 in the CRM relates to customer C-0098 in the ERP. The usual approach is to store the external ID in each system, or keep a correspondence table in the integration layer.
  • Fields and formats: dates, currencies, taxes, units, addresses, product codes (SKUs).
  • Catalogs: order statuses, payment methods or categories that have different names in each tool.
  • Transformation rules: for example, a product with variants in the store that are separate references in the ERP.

This map also reveals quality problems: duplicate customers, products without SKUs or outdated prices. It is best to clean them up before the first sync.

Step 3: choose how they sync

There are three main patterns, and a mature integration usually combines them:

  • Real-time events (webhooks)

    The source system notifies you as soon as something happens: "new order", "payment confirmed". It is the right pattern for what cannot wait, such as an order that must reserve stock. It requires the source to offer webhooks and the integration to be always available to receive them.

  • Periodic queries (polling)

    The integration asks every so often "what changed since last time?". It works when the system does not emit events. It is simpler, but adds delay and uses API quota.

  • Batch sync

    A scheduled process moves large volumes of data, for example the full catalog every night. It is useful for initial loads, reconciliations and older systems that only export files.

A frequent combination: orders and payments through events, stock through events plus a periodic reconciliation, and the catalog in batches.

Step 4: direct connection or an integration layer

With two systems, connecting them directly may be enough. With three or more, point-to-point connections multiply and every change in one system breaks several integrations.

The alternative is an integration layer of your own: an intermediate service that receives the events, transforms the data and delivers it to each destination. It has clear advantages:

  • One place where the rules, mappings and logs live.
  • If you change CRM, only one connector is rewritten, not every integration.
  • You can add queues to absorb volume peaks and retry without losing data.

For simple flows between popular apps, a no-code tool (such as Zapier, Make or n8n) can be that layer at first. When there is volume, rules of your own or systems with no available connector, building it custom usually makes sense.

Step 5: design for when something fails

APIs go down, responses are slow and messages arrive duplicated or out of order. A reliable integration assumes this from the design:

  • Idempotency: processing the same event twice must not create two orders or two invoices. It is achieved by storing the ID of every event already processed.
  • Retries with increasing wait when a system does not respond, and a dead-letter queue to review what could not be delivered.
  • Respect for each provider's API limits.
  • Event order: if "order cancelled" arrives before "order created", the system must know what to do.
  • Logs and alerts: every sync is recorded and a person gets a notice when something really fails.
  • Periodic reconciliation: a process that compares source and destination (for example, stock) and fixes any differences that slipped through.

Step 6: stock, the most delicate case

Inventory is where poorly designed integrations fail first, because it changes constantly and from several channels at once. Two recommendations:

  1. 1.Reserve stock at the moment of the order, not when someone processes it later.
  2. 2.Resolve the reservation in one place, with an atomic database operation, so two simultaneous orders do not get the same unit.

It is the same principle we apply at Dybri Store, a store where every garment exists only once: the reservation is resolved in the database, so if two customers ask for the same garment only one gets it; if the sale is not confirmed within 24 hours, the hold expires and the garment becomes available again.

If your business sells online, in e-commerce solutions we explain how we approach connected catalogs, orders and stock.

Example: the journey of an integrated order

An illustrative scenario of how it all looks together:

  1. Online store

    Emits the "order created" event

    Order created

  2. Integration layer

    Checks for duplicates and validates data

    No duplicates

    Review queue

    If something fails, the owner is alerted

    Queued

  3. CRM

    Creates the customer or links the order to their record

    Customer linked

  4. ERP

    Creates the order, reserves stock and invoices

    Stock reserved

  5. Customer

    Gets the shipping status and notification

    Notice sent

Illustrative diagram of an order's journey between systems. It does not correspond to a real client.
  1. 1.A customer buys in the online store. The store emits an "order created" event.
  2. 2.The integration layer receives it, checks it has not been processed before and validates products and customer.
  3. 3.If the customer does not exist in the CRM, it creates them; if they do, it links the order to their record.
  4. 4.It creates the order in the ERP and reserves the stock. The new stock is published in the store.
  5. 5.When the ERP issues the invoice, the document is linked to the order in the CRM. If your country requires electronic invoicing, this step connects to the system or provider that issues it.
  6. 6.On dispatch, the shipping status goes back to the store and the customer receives the notification.
  7. 7.If any step fails, the event stays in the review queue and the owner receives an alert.

Nobody typed the same data twice, and every step was recorded.

Common mistakes

  • Starting to code without having defined the source of truth for each piece of data.
  • Syncing the same field in both directions with no rules to resolve conflicts.
  • Migrating dirty data and multiplying duplicates across all systems.
  • Having no logs: when something fails, nobody knows at which step.
  • Storing API credentials in the code instead of in a secrets manager.
  • Ignoring personal data: every integration should move only the data it needs and comply with the data protection rules that apply to your company.

Frequently asked questions

What if my ERP has no API?

There are alternatives: scheduled file exports and imports, controlled database access or an intermediate service that exposes an API of its own on top of the old system. Each option has different reliability, and it is worth evaluating them with a technical review before committing to deadlines.

Is it better to integrate or to replace everything with a single system?

It depends. If your tools work well separately, integrating them is usually faster and less risky than migrating everything. Replacing makes sense when a system no longer covers your operation. We look at it in custom software vs. off-the-shelf software.

How much does an integration cost?

It depends on the number of systems, the quality of their APIs, the data volume and how many rules and exceptions there are. The general factors are in our guide on how much custom software costs to build.

Does syncing have to be real time?

Not always. Orders, payments and stock usually need it; catalogs, reports and master data can sync in batches without affecting operations.

Where do I start?

With a single flow that today consumes time and causes errors, usually orders. If you are at that point, our guide to business process automation may help.

Conclusion

Integrating ERP, CRM and online store is, above all, a decision about how your business information flows: which system is the master for each piece of data, how it syncs and what happens when something fails. With those decisions clear, the technical part becomes far more predictable.

At Devecu we design integrations and automations with error handling, retries, logs and alerts, so your systems work as one. If your team spends hours copying data between tools, tell us about your project.

Back to the blog

Do you have a product or an idea you need to build?

Tell us what you need to solve. We can help you define the solution and turn it into software.

Tell us about your project

Choose which categories you allow. You can change your choice at any time from the "Cookie settings" link in the footer. Cookie Policy.