Blog

IT integration: how to prevent missing and duplicate orders

IT integration: how to prevent missing and duplicate orders

A practical design for order synchronisation: ownership, safe retries, reconciliation and clear acceptance criteria.

The shop says an order was sent. The warehouse cannot find it. Someone clicks “send again”, and two orders appear. Each application may be working as designed; the missing part is a shared agreement about what a successful transfer means.

Before choosing an integration platform, describe one complete business event. For an order, that includes creation, acceptance, rejection and cancellation. A connection that handles only the happy path leaves the support team to finish the design during an incident.

Decide who can change each fact

List the fields exchanged and assign an authoritative system to each. The shop might own the customer’s order request, the warehouse the dispatch status, and accounting the invoice number. These are separate responsibilities. Giving two systems unrestricted permission to overwrite the same status invites conflicts.

Keep a stable identifier across the flow. A company name or email address is a poor substitute: either can change, and neither reliably identifies an order. Record the source identifier alongside the destination identifier so support can trace a transfer without guessing.

A timeout is an uncertain outcome

If a receiving system takes too long to answer, the sender cannot tell whether the operation failed or succeeded without a response. Repeating an order-creation request can create a duplicate. For this operation, agree an idempotency key: repeated attempts with the same key represent the same intended action, within the receiver’s documented retention period.

The receiver needs to remember the outcome reliably. A field called “request ID” is insufficient if it is only written to a log. Where the API offers no such guarantee, design a reconciliation step before retrying and make unresolved cases visible to an operator.

“Delivered to an API” and “accepted as a business order” are different states. Record both.

Choose the transport around the delay you can tolerate

ApproachUseful whenQuestion to settle
Scheduled batchA delay is acceptableHow will missed records be detected?
Direct API callThe user needs an immediate resultWhat happens if the receiver is unavailable?
Queue or eventWork can finish asynchronouslyHow are duplicates and failed messages handled?

An API, a queue and an integration platform can coexist. They solve different parts of the problem. Buying a platform does not decide data ownership or resolve contradictory business rules.

Reliable order transfer; Identify; Accept; Retry safely; Reconcile
Each stage needs an explicit outcome and an owner; this is a process diagram, not a performance benchmark.

Accept the failure paths before launch

Test a repeated event, an invalid address, a receiver outage and a timeout after the receiver has committed the order. Check that retries are limited and delayed, that rejected records have an owner, and that recovery does not require editing the production database by hand.

Finally, reconcile the business records. Compare accepted orders with dispatched orders for a defined period, using identifiers and statuses rather than totals alone. Two missing orders and two duplicates can produce the right count. Track the age of the oldest unresolved transfer as well as the queue size. That gives operations a useful signal: which customer is still waiting, and who must act next.

Sources and documentation