All blog topics
ERP Practical Guidance

ERP interfaces: preventing duplicate postings on retries

If an ERP interface does not respond in time, the request has not necessarily failed. An uncontrolled retry can post the same transaction again. Unique transaction identifiers, reliable status queries and clear recovery rules are essential.

ERP6 min readUpdated 10 November 2026Softwarecheck Editorial Team

A timeout is not evidence of a failed posting

An upstream billing system sends a posting request to the ERP. The ERP processes it and commits the accounting document, but the response never reaches the sending system. A timeout appears there. If the request is now sent again without further checks, a second posting may result. From the integration's perspective, the outcome is initially uncertain: no response and no processing are different states.

Safeguards must therefore go beyond reliable transmission alone. Queues, scheduled recovery runs and manual restarts can all redeliver messages that have already been delivered. What is needed is idempotent processing: repeating the same request must not produce an additional business effect. This must apply throughout the relevant processing path, not just when an upstream integration service accepts the request.

Before technical implementation, it is important to define exactly what may happen only once. For a posting request, this could be the creation of a specific ERP accounting document. A more complex workflow may involve several separate steps, such as document creation followed by approval. Each step needs a clear status and a defined retry rule. A general indicator such as “message received” does not prove that the business transaction has been fully completed.

The transaction identifier must identify the request

A stable transaction identifier, often called an idempotency key, links the original request to its retries. It is generated before the first transmission, stored persistently and reused unchanged for every subsequent attempt. A request identifier generated afresh for each HTTP call is not suitable for this purpose. A document number alone is also often insufficiently specific: its scope of uniqueness may depend on the source system, tenant or financial year.

The key must distinguish the business operation, not just the overarching business object. An invoice and its subsequent reversal, for example, are different requests. Similarly, valid partial transactions must not be accidentally suppressed as duplicates. The interface contract should therefore explicitly describe how keys are generated, their scope of uniqueness and how business corrections are handled.

The target system must also be able to detect when the same key arrives again with changed content. It can do this using the stored original request or a checksum of its business-relevant fields. A different amount under the same identifier should not be accepted silently. The conflict must be handled through a traceable error-handling process; an actual correction requires a defined amendment or reversal process.

  • The identifier remains unchanged across automatic and manual retries.
  • The source system, tenant and business operation define a clear scope of uniqueness.
  • The same key with changed content produces a visible conflict rather than silently overwriting data.
  • Corrections and reversals are treated as separate transactions linked to the original.

Duplicate checks and posting must remain coordinated

A simple preliminary query such as “Does this identifier already exist?” is not enough. Two retries arriving at the same time could both find that no entry exists and then both post. Processing needs a technical safeguard against this race condition, such as a database uniqueness constraint combined with suitable transaction management. What matters is that only one processing attempt can actually execute the business request.

The gap between storing the transaction identifier and making the actual ERP posting is particularly critical. If the identifier is marked as complete before the posting subsequently fails, a request may be lost. If posting happens first and saving its status then fails, a duplicate may be created during recovery. Within a single system, the posting and its completion status should therefore be committed in the same transaction wherever possible.

Across system boundaries, a shared transaction is often not possible. In that case, the integration needs a persistent processing record and a way to retrieve the ERP accounting document using a stable external reference. An integration service alone does not remove the uncertainty if the ERP neither enforces a unique reference nor supports a reliable query for the result. This limitation should be disclosed during selection rather than concealed behind a general promise of “duplicate prevention”.

Uncertain outcomes need a defined resolution process

In day-to-day operations, it should be possible to distinguish at least between transactions that have been accepted, are still in progress, have completed successfully, have been definitively rejected or have an uncertain outcome. A technical acknowledgement of receipt is not proof of posting. After a timeout, the sending system should, where possible, first query the status using the original identifier. If the request is complete, it needs a reference to the existing result, not an instruction to make a new posting.

Status queries can also have limitations. If a search whose data is updated with a delay returns “not found”, this does not prove that the request was never processed. The interface contract must therefore define which response is authoritative and how long a transaction is treated as in progress or uncertain. Retries use the same identifier and controlled intervals. Business-rule rejections, for example because an accounting period is closed, must not be retried indefinitely as though they were temporary connection errors.

Cases that cannot be resolved automatically need a designated owner and a worklist containing the source reference, processing history and any ERP accounting document number. Manual intervention should be logged and require reconciliation with the ERP. Retention of processing records also belongs in the operating procedures: if identifiers are deleted before the period in which messages can be replayed has ended, duplicate protection loses its effectiveness.

  • Business teams and IT jointly define who is responsible for resolving and documenting uncertain posting states.
  • A manual restart retains the original identifier and does not bypass duplicate checks.
  • Monitoring covers overdue processing and unresolved cases, not just technical availability.
  • Retention and recovery arrangements also account for later reimports and recovery runs from backups.

Acceptance testing must cover failure scenarios, not just successful ones

During selection and implementation, safe retry handling should be defined as a verifiable requirement. A successful test posting says little about behaviour when a response is lost, requests are processed concurrently or a restart occurs. Vendors and implementation partners should show where the transaction identifier is stored, which component enforces its uniqueness and how an existing posting result can be retrieved later. What matters is the specific interface being offered, not a general product capability.

Acceptance testing should deliberately introduce interruptions at critical points: after acceptance, during processing and after a successful posting but before the response is delivered. After each attempt, the source request, integration log and ERP accounting document are reconciled. The expected outcome is not merely an error message without a duplicate, but a complete and traceable business transaction. A suppressed request with no posting is just as much an error as duplicate execution.

The results should be included in the operational documentation and in repeatable regression tests. Changes to interfaces, integration services or posting logic can affect these safeguards. If the ERP does not provide an adequate technical guarantee, the remaining gap must be explicitly assessed. Manual reconciliation may then serve as a compensating control, but it is not equivalent evidence of processing that automatically handles retries safely.

  • Send the same request sequentially and in parallel: only the intended business effect occurs.
  • Interrupt the response after a successful posting: the recovery run finds the existing result.
  • Send the same key with a changed amount: the conflict is visible and the request is rejected in a controlled manner.
  • Restart processing between acceptance and completion: no request is lost unnoticed.
  • Replay an older request: the agreed duplicate protection remains effective beyond routine daily processing.

Related reading