Concept
Idempotency and retries
Last updated
Also called: idempotent operations, dead-letter queue, exponential backoff
An operation is idempotent if running it twice has the same effect as running it once. Reliable GTM systems combine idempotent writes with retries and increasing delays for transient failures, and a dead-letter queue where permanent failures wait for a person instead of disappearing.
Why it matters
Webhooks are often delivered more than once and jobs are re-run after failures. Without idempotency, reps get duplicate tasks and prospects get duplicate emails; without retries and a dead-letter queue, leads silently vanish when an API times out.
Worked example
A signal handler checks a processed-event log before acting, checks whether the person is already enrolled in the sequence, and enrolls with an upsert keyed on stable IDs. Timeouts and rate limits are retried with backoff up to a limit; invalid records go to a dead-letter queue with the error, and an alert fires when the queue grows.
Common mistakes
- Using blind inserts instead of upserts keyed on stable IDs.
- Retrying permanent errors (invalid data, permissions) forever.
- Retrying immediately and repeatedly, which worsens rate limits.
- Letting failed records disappear without a queue and an owner.
Questions
Which failures should be retried?
Transient ones such as timeouts, rate limits, and temporary server errors. Permanent failures such as invalid data or permission errors go to an error queue for a person.
How do I make a workflow idempotent in a no-code tool?
Check state before acting (is this contact already enrolled?), use upsert actions keyed on IDs, and record processed event IDs where the tool allows.