ERP integration retries without duplicate orders

Sawsan Sayad
Sawsan Sayad covers enterprise systems, AI and business software for The Blue LED Global.
An order request times out. The sales team sees no confirmation, so the integration sends it again. If ERP accepted the first request, the second attempt can create a second order.
Before enabling automatic retries, agree how the integration identifies one business operation, checks an uncertain result and stops when it cannot proceed safely. Those decisions belong in the interface contract, acceptance tests and support handover.

Conceptual retry controls. Verify the endpoint contract; a local operation ID alone does not protect a remote ERP write.
Our guide to batch, synchronous API and event-driven ERP and CRM integration explains how to choose a processing pattern. This article addresses a narrower question: what should happen when an order submission needs another attempt?
Treat a timeout as an unknown outcome
A missing response does not establish that ERP rejected the request. The target may have completed the write before the connection failed. Microsoft describes this failure mode in its Retry pattern guidance.
Hypothetical example: A distributor submits CRM order CRM-482 to ERP. ERP creates order ERP-731, but its response is lost. A retry with a fresh operation identifier may look like a new order. The intended result is one ERP order linked to the original request, with its status returned to CRM. This is an illustrative scenario, not a Blue LED customer result.
Use a visible “outcome pending” state until evidence resolves the request. Tell users whether they may edit or resubmit it. A screen saying “try again” should not quietly launch a second business operation.
Give each business operation a stable identity
Idempotency means repeating an operation does not add another business effect. AWS recommends a caller-provided request identifier to express the original intent; identical request contents alone may also represent two intentionally separate operations. See AWS guidance on idempotent APIs.
For an order interface, persist the operation ID before sending and reuse it after restarts or authorized replay. Agree its company and operation scope. Give creation, amendment and cancellation separate identities.
A proposed interface worksheet should answer these questions:
| Contract item | Decision to record |
|---|---|
| Identity | What identifies one operation, and where is it persisted? |
| Request contents | Which fields define the original intent, and how are they compared? |
| Outcome | Which response or supported lookup establishes the ERP result? |
| Concurrent attempts | What stops two workers from applying the same operation? |
| Retention | How long is the identity remembered at each relevant component? |
| Recovery | What happens to a request that remains in progress or arrives too late? |
Reject conflicting reuse of an identifier
Reusing an ID with a different quantity, customer or currency must not silently become a retry of the original order. Define a detectable conflict and a correction procedure. For a concrete vendor example, Amazon EC2 documents a parameter-mismatch error for specified token-based operations. This is not evidence that an ERP endpoint provides the same behavior.
Resolve the original result before deciding whether a correction requires a separately authorized amendment or a genuinely new operation. Do not generate a fresh ID merely to bypass a conflict.
Verify protection at the ERP write
An existence check can race with another worker. A crash can also separate the ERP write from its local completion record. Microsoft’s Idempotent Consumer pattern addresses these failure windows.
Ask where protection actually operates. A local transaction does not automatically include a remote ERP API. When protection is unverified, hold uncertain writes. A “not found” lookup can remain inconclusive while work is in flight or the view is delayed.
Make the replay window explicit
Do not assume that an idempotency key remains effective forever. Retention is part of the specific API contract; for example, Amazon ECS documents a limited lifetime for RunTask tokens. Its rules are not a recommended retention period for ERP orders.
Compare each component’s retention with permitted outage recovery and manual replay. Document the post-expiry procedure. Before replaying older work, require reconciliation or another verified safeguard. A longer-lived middleware record cannot extend target protection.
Broker settings need a separate check. Azure Service Bus duplicate detection tracks message identifiers within a configured window; it is not a payload-comparison contract for the ERP. In particular, a queue accepting a message is not evidence that the intended order exists.
Retry selectively and with limits
AWS recommends exponential backoff, jitter and bounded retries, and warns against retries multiplying across application layers. See Control and limit retry calls.
Agree one coordinated policy with the connector, SDK and middleware owners. Set the maximum attempts, elapsed-time budget and delay cap. Include randomized delay and any documented server-directed wait. Tune these settings against business deadlines and measured behavior rather than copying an arbitrary retry count.
Use this proposed decision guide with the endpoint’s documented errors:
| Observed condition | Required handling |
|---|---|
| Documented temporary failure | Retry within budget only when repeating the write is safe. |
| Timeout with uncertain commit | Use the verified idempotency contract or reconcile; otherwise hold. |
| Invalid business data or missing permission | Route for correction instead of endlessly resending unchanged input. |
| Exhausted budget or expired protection | Stop automatic writes and assign an exception without declaring an unknown result “not created.” |
A retry also consumes target capacity. AWS’s timeouts and backoff guidance explains why aggressive retries can prolong overload. Measure backlog recovery as well as normal response time.
Assign an owner before the first exception
For a rollout across Lebanon and GCC teams, document support hours, time zones, handoff contacts and Arabic or English instructions as needed. Do not leave recovery dependent on the developer who built the connector.
Each exception should carry the operation ID, source order, company, known target reference, current evidence, attempt history, next action and named owner. Restrict access to sensitive order data and avoid placing credentials in logs.
Separate responsibilities: the integration owner investigates delivery, the ERP process owner confirms the business result, and the authorized approver decides on corrections with operational or financial consequences. A replay action should retain the original identity and an audit trail. Manual order entry while an uncertain request is still running needs the same control.
Accept business outcomes rather than successful messages
Run controlled failure tests in an authorized nonproduction environment. Microsoft recommends testing retry behavior under faults and concurrency in its transient fault handling guidance. The following is a proposed ERP acceptance set, not a claim about any product’s default behavior.
| Test | Evidence to require |
|---|---|
| ERP commits but the response is lost | One intended order; original operation resolves to that order. |
| Two workers submit the same operation together | No second order; documented behavior for the competing attempt. |
| Same ID arrives with changed order contents | Visible conflict; no silently altered or extra order. |
| Worker restarts after ERP commits | Recovery establishes the outcome before another unsafe write. |
| Backlog is replayed near and beyond retention limits | Late requests follow the agreed safeguard or exception path. |
| Target remains unavailable or rate-limits requests | Attempts and total waiting remain within policy; an owner receives the exception. |
| An authorized operator replays a request | Original identity and evidence remain traceable. |
| A distinct, legitimate order has identical line items | It is not incorrectly suppressed as a duplicate. |
Inspect order-level results, not just counts: company, customer, currency, quantities and lifecycle status must match the intended operation. Confirm that CRM stops showing “pending” only when the agreed evidence is available. Record unresolved limitations before sign-off.
Bring one order flow to discovery
Prepare the source and target versions, endpoint documentation, sample requests, existing retry settings, peak volumes and one uncertain-outcome example. Ask for the operation contract, failure-test evidence and recovery runbook as explicit deliverables.
The Blue LED Global’s integration and data migration service covers agreed interfaces, mappings, exceptions and handover. Our testing, training and support service connects acceptance scenarios with user instructions and support ownership. We confirm scope and supported platform capabilities for each engagement.
The acceptance goal is a demonstrably controlled order flow. No broker feature, retry library or successful demonstration alone establishes an end-to-end “exactly once” guarantee.
Sources checked on 28 October 2026.
Sources
- Retry pattern guidance
- AWS guidance on idempotent APIs
- Amazon EC2 documents a parameter-mismatch error
- Idempotent Consumer pattern
- Amazon ECS documents a limited lifetime for RunTask tokens
- Azure Service Bus duplicate detection
- Control and limit retry calls
- timeouts and backoff guidance
- transient fault handling guidance