Skip to content
Quantum9
IntegrationHiring

Idempotence in integrations: avoid duplicate requests

2 min reading
Editorial illustration: Idempotence in integrations: avoid duplicate requests

A communication failure can occur after the target system has already created an order. Repeating the operation without identifying the previous attempt may duplicate the sale or delivery.

How to evaluate this decision

Define a stable key for business operation, not for every technical attempt. Determine the protection period and behavior when the same key arrives with different data. When the target does not provide an appropriate mechanism, integration needs to carefully reconcile results. Consult before recording, without concurrency control, can continue to allow duplication.

Criteria for comparing proposals

  • Identity: relating source event, intended operation and target result.
  • Concurrency: Prevent simultaneous attempts from performing the same action twice.
  • Recovery: distinguish operation not started, in progress and completed with lost response.

A scenario to discuss with the supplier

Hypothetical example: the ERP creates the request, but the connection drops before the response. The retry should retrieve the existing result, rather than creating another order with a different number.

What to validate upon delivery

Simulate missed responses, repeating events, and concurrent calls. Directly check the target records and the consistency of the identifier used by the source.

Prepare the conversation about the project

Inform Quantum9 of critical operations, identifiers and capabilities of the APIs. The scope must include duplicity as a test scenario, especially in flows that generate financial or operational commitments.

Integrations and APIs · Map the company's priority

Deepen the assessment

Read the context guide for this hire.

Let's evaluate your company's scenario?

Tell us about the problem, the systems involved and what needs to change. From there, we define the next step and the scope of the conversation.