top of page

How to Prevent Duplicate Actions When an Integration Retries

Oct 20
4 min read
A stable operation identifier lets a repeated request reuse a known result instead of creating another business action.

A coordinator clicks “create task.” The screen stalls, so they click again. Later, two tasks appear. The problem is not simply an impatient user: the workflow failed to make repeated attempts refer to the same intended action. Preventing duplicate integration actions starts with identifying that action before sending it.


The technical term is idempotency: repeating an operation has the same intended effect as performing it once. Business teams do not need to implement the mechanism themselves, but they should ask what it covers, where it stops and how ambiguous outcomes are resolved.


Distinguish a retry from a new request


Consider an illustrative intake process. Submission S-104 needs one triage task. A second network attempt to create that task is a retry. A later request for a separate follow-up task is new work, even if it concerns the same submission.


A useful operation identity therefore includes the purpose of the action, not merely the customer's name. Names and email addresses can change, be shared or appear in several legitimate tasks. Ask the implementer to define the identity using stable internal identifiers and the specific action being requested.


Keep that identity stable across retries. Generating a fresh identifier every time the network fails defeats the purpose: each attempt can look like a new instruction.


Verify the actual API contract


Stripe provides a documented example of an idempotency key. Its API v1 can return the previously saved status and response for a repeated key after execution begins, including an error response. Its documentation also describes key retention and parameter checks. API v2 has different behavior, so even within one provider the version matters.



Do not assume another service offers the same guarantee, retention window or supported endpoints. Ask which destination method supports idempotency, what parameters it compares, how long it remembers a request and what happens after that memory expires. Put those answers beside the integration's recovery procedure.


Keep a record of the intended operation


The following is a proposed business-facing operation record, not a replacement for technical concurrency controls:


  • Operation: create the initial triage task for submission S-104.

  • Stable key: an opaque internal identifier assigned before the first attempt.

  • Approved input version: the exact data that this operation is allowed to use.

  • State: pending, completed, failed or outcome unknown.

  • Destination evidence: the returned task identifier when available.

  • Recovery note: what an operator must check before another attempt.


The distinction between failed and unknown is important. If a connection disappears after the destination accepts a request, the sender may not know whether the work happened. Labeling that situation as “nothing created” invites an unsafe retry.


Handle concurrency explicitly


Two workers can receive the same event at almost the same time. A simple sequence of “look for the task, then create it if absent” can fail if both workers look before either creates. Ask how the system prevents competing workers from committing the same operation.


The answer may involve a destination-provided idempotency mechanism, a database uniqueness constraint or another atomic coordination method. The implementation depends on the systems involved. Require a simultaneous-delivery test that inspects destination records, rather than accepting only a diagram of the intended behavior.


Treat a multi-step workflow as several outcomes


Suppose task creation succeeds, but attaching a document fails. Repeating the entire workflow may create another task. A more useful recovery action resumes the attachment step against the known task identifier, provided that this action is still valid and authorized.


Track each consequential step separately. An operation key on one API call does not automatically protect later emails, file uploads or changes in another application. Ask what happens if the workflow stops between every pair of steps.


Also define how changed input is handled. Reusing an old key while altering important parameters can be rejected or produce behavior the operator did not expect. A genuine change should follow the provider's documented rules and the team's approval policy.


Acceptance tests for duplicate prevention


Use synthetic or approved records and verify the destination after each test:


  • Repeat the same request after a lost response.

  • Deliver two copies concurrently.

  • Restart the integration while an operation is pending.

  • Retry only the incomplete step of a partly completed workflow.

  • Submit a legitimate second action for the same customer.

  • Revisit an old request after the documented deduplication window.


The final two cases ensure the system does not suppress valid work while preventing duplicates. “Never create two records” is too crude a requirement when two records may sometimes be correct.


Make recovery part of delivery


Ask for an operator view that shows what is known, what remains uncertain and who can resolve it. Record an explicit policy for unknown outcomes; do not let repeated clicking become the recovery procedure.


Connect this requirement to human approval in AI workflows, especially when a changed action needs renewed review. The FutureOS introduction can help you frame the business need for a prospective project.


Editorial note: Prepared with AI assistance. Linked sources checked on October 20, 2026. Scenarios and acceptance tests are illustrative, not claims about a deployed FutureOS integration.


Comments


Commenting on this post isn't available anymore. Contact the site owner for more info.
bottom of page