# Idempotency and retries

> Concept page from *The GTM Engineering Handbook* by Jared Waxman (GTM Engineer School).  
> Web version: https://gtm-engineer-school.com/resources/gtme-handbook/concepts/idempotency/  
> Last updated: 2026-11-27  
> © 2026 Jared Waxman. All rights reserved. Short quotations with attribution and a link are welcome.

**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.

## Related concepts

- [Reverse ETL](https://gtm-engineer-school.com/resources/gtme-handbook/concepts/reverse-etl.md)
- [CRM deduplication](https://gtm-engineer-school.com/resources/gtme-handbook/concepts/crm-deduplication.md)
- [Build versus buy](https://gtm-engineer-school.com/resources/gtme-handbook/concepts/build-vs-buy.md)
- [Lead routing](https://gtm-engineer-school.com/resources/gtme-handbook/concepts/lead-routing.md)

## Where the book covers it

- [Chapter 14 · 14.4 Reliability engineering for GTM systems](https://gtm-engineer-school.com/resources/gtme-handbook/tooling-build-vs-buy.md)
- [Chapter 14 · 14.5 Service levels, observability, and the weekly health review](https://gtm-engineer-school.com/resources/gtme-handbook/tooling-build-vs-buy.md)
- [Chapter 18 · 18.6 Days 31 to 60: stabilize](https://gtm-engineer-school.com/resources/gtme-handbook/first-90-days.md)

---

All concepts: [concepts.md](https://gtm-engineer-school.com/resources/gtme-handbook/concepts.md) · Practitioner questions: [questions.md](https://gtm-engineer-school.com/resources/gtme-handbook/questions.md) · All chapters: [llms.txt](https://gtm-engineer-school.com/resources/gtme-handbook/llms.txt)
