API integration for ERP and CRM: reduce duplicate data entry

Define the first workflow, verify its results and prepare retries after a lost reply without creating another order.

A tablet and monitors displaying task boards and charts.

Article content

An ERP/CRM integration reduces duplicate data entry when each field has an authoritative source, each operation has a stable identity and failures can be recovered without creating the work again. Start with one workflow, such as transferring an approved CRM order to the ERP. Verify the result in the receiving system before showing it as complete.

The difficult case is an order that was created but whose reply never arrived. A timeout does not prove that creation failed. Retrying with a new identifier may create a second order. This guide helps a small business and its technical team define the flow, prepare recovery and demonstrate the actual outcome.

Choose one workflow and check the evidence

Identify a task copied between two tools: an accepted request, an order, contact details or fulfilment status. Record its trigger, transferred fields, owner and acceptable delay. First check whether a supported connector covers that workflow, including failures. An available connection does not guarantee support for your business rules.

When two orders look alike or a status remains pending, collect evidence before diagnosing an outage: source request, time and time zone, operation identifier, HTTP response and any ERP reference. Compare integration logs with destination records. Two messages may represent one operation; two legitimate orders may also contain identical products. A customer name or email address is not enough to decide.

Our custom application project guide places this work within the overall engagement. Improving one exchange does not require replacing every system.

Assign ownership to fields and decisions

For each field, name the system that owns the value. The CRM might own the commercial request; the ERP, its order reference and fulfilment status. Document cancellations, deletions, units, dates and identifier changes. If both systems can edit a field, define the conflict rule explicitly.

Have business and technical owners approve a short workflow record:

  • Trigger: which decision authorises the transfer?
  • Mapping: which fields, formats and values are expected?
  • Identity: which reference represents this operation in each system?
  • Confirmation: which evidence proves the result was saved?
  • Exception: who corrects, retries or stops the transfer?

Confirm access, limits and costs

Supported operations and access

Before estimating the work, confirm the operations available with your licences and API versions, permissions, request limits and test environment. Allow for mapping, development or configuration, possible connector licences, processing infrastructure, logs and support. No single price or product fits every pair of systems.

Data definitions and formats

Test representative valid and invalid records. Confirm whether a customer, quantity or date means the same thing on both sides. If the exchange uses files, the same ownership rules still apply. The CRM CSV import guide explains value checks. A missing API does not justify writing directly into a database through an unsupported interface.

Keep one identity across retry attempts

An idempotent operation can be repeated without multiplying its intended effect. This does not require every response or log entry to be identical. The HTTP standard says a client should not automatically retry a non-idempotent request unless it knows the semantics support that retry, or can establish that the original request was not applied.

Ask what the destination actually guarantees: does it support an idempotency key, a unique external reference or a reliable operation lookup? What is the scope of that identity — business, account and action — and how long is it retained? The mechanism must cover the final write that could otherwise be duplicated.

Keep the same identity for retries of the same approved intent. Give a new order a new identity even when its products and amounts match a previous order. If the payload changes during recovery, do not silently treat it as the original request. Block the conflict and decide whether it is a correction or a separate operation. The AWS discussion of idempotent APIs explains the relationship between identity, intent and retries.

A local “processed” file is insufficient if two concurrent workers can both create an order before updating it. Checking and recording the operation must prevent that race. AWS also recommends durable identifiers and protection for downstream effects. Storing a key in the integration does not make a separate ERP write atomic. A crash between the two writes still requires a supported lookup or controlled resolution.

Illustrative case: the order was saved, but the reply was lost

At a fictional distributor, the CRM approves request REQ-1042. The integration assigns a stable identity such as company-A:order:REQ-1042:v1. This notation illustrates the principle; the actual format depends on the API contract. The ERP creates order ERP-5081, then the connection closes before confirmation reaches the CRM.

The CRM should retain a status such as “result needs verification,” linked to the operation reference. The team checks the log and the ERP’s supported lookup or retry mechanism. If the operation is found, it links ERP-5081 to REQ-1042 and verifies essential fields. If the API guarantees retries with the same key, recovery follows that contract instead of starting an unrelated creation.

An empty search result may not immediately prove that no order exists: a search index can update later. Without sufficient evidence, keep the operation under review and assign a person to resolve it. Manually creating another order while automated retries remain active can also produce a duplicate. Coordinate manual recovery with the pending process.

Make the recovery procedure usable

An exception record should include the source reference, operation identity, destination reference when available, observed state, last attempt, planned next step and owner. Minimise personal information in logs; do not copy secrets or entire customer records into them.

  • Confirmed result: read back the reference and expected fields, then close the operation.
  • Rejected data: correct the field or rule; resending the same invalid payload does not solve it.
  • Temporary unavailability: use bounded, spaced retries only when the operation is safe to repeat.
  • Unknown result: check the destination or use its documented idempotent retry; leave the exception open when evidence is missing.
  • Same identity, different payload: block the conflict and review the intent.

Microsoft’s retry pattern recommends separating transient failures, limiting attempts and choosing delays appropriate to the service. Stacked retry layers can multiply requests, so assign responsibility clearly. A 429 response may include Retry-After, as described in the HTTP extension standard; follow the provider’s contract as well. Neither that status nor a timeout replaces verification of the business result.

Demonstrate the outcome before launch

Agree on expected outcomes first

Write expected results with the business owner, then test in an isolated environment. For an order, do more than count successful HTTP responses: read back the number of orders, their identities, their fields and the reference returned to the CRM.

Test failure and recovery paths

  • One valid submission produces one order linked to the correct request.
  • Repeated deliveries of the same operation, including concurrent attempts, do not multiply the order.
  • A reply lost after saving can be resolved without a new creation.
  • A restart does not erase the identity of completed work.
  • The same key with a different payload produces an explicit conflict.
  • Two legitimate orders with identical contents remain distinct.
  • Invalid data remains visible for correction; exhausted retries reach an assigned owner.

Add cancellation, retries after key expiry and actual downstream effects such as invoices, stock reservations or notifications. Protecting order creation alone does not prove those effects are protected. Use the user acceptance testing grid to record evidence and launch criteria.

We ran 12 scenarios against a local HTTP API simulating an ERP, using fictional orders and a SQLite database. All 12 expected outcomes were obtained, covering a lost reply after commit, concurrent repeats, changed-content conflicts, a pre-write failure, rollback and a process restart. The unprotected counterexample created two orders as expected. These tests validate neither a real ERP nor a distributed transaction.

Choose timing that fits the workflow

Use an immediate response when a person cannot continue without it, a queue to absorb an outage or a batch for periodic reconciliation. The interface should distinguish a saved request, a pending transfer, an uncertain result and a confirmed outcome.

Assign ownership after launch

Regularly compare expected operations with destination records using matching identities and time periods. Monitor waiting time, conflicts, exhausted retries and unusual silence. Zero reported errors does not prove requests are still arriving. Name an owner, an alert threshold and a way to pause processing without losing pending work.

Limit access and transferred information

Grant only the permissions the integration needs, protect secrets and document rotation. The OWASP API Security reference describes risks including broken authorisation and excessive trust in third-party APIs. Have the appropriate owners review access, retention and transferred information. This guide does not certify an integration’s security or regulatory compliance.

First-workflow checklist

  • The trigger, authoritative sources and accountable owner are defined.
  • API limits, potential costs and recovery mechanisms are confirmed.
  • Each operation retains its identity across attempts.
  • Lost replies, concurrent duplicates and restarts have been tested.
  • Destination evidence confirms the result.
  • Exceptions and reconciliation have an owner after launch.

Prepare your ERP/CRM integration

To scope a custom application or integration in Canada, bring the two system names, one workflow still copied by hand and an anonymised exception example. These provide a starting point for a verifiable first flow and clear boundaries.

Explore more articles

Let’s discuss your project.

Tell us what you would like to improve. We’ll help you decide on the next steps.

Start the conversation