Automate exits, not only entries
Every automation that creates work when a record enters a state must also define what happens when it leaves it—or the downstream state goes stale.
Independently created. Contains no employer or client implementation detail, internal names or figures.
01Context
Segments, eligibility and lifecycle states drive tasks, campaign memberships and recovery processes. Each automation was built for the entry: when an account becomes At Risk, create a task and add it to a campaign. None was built for the exit. Recovered and ineligible accounts keep receiving actions, and cleanup is a periodic manual job.
02Decision drivers
- D01
States change in both directions
- D02
Stale actions waste owners’ time and send wrong messages
- D03
Reruns must not duplicate work
- D04
Work in progress must not be discarded
03Options considered
| Option | Right when | Cost / trade-off | Verdict |
|---|---|---|---|
| Entry automations only; periodic manual cleanup | States that never reverse | Drift accumulates; risky bulk edits | Rejected |
| Delete and recreate all actions each run | Tiny, stateless populations | Loses work in progress; churns records | Rejected |
| Designed exits per action, plus a reconciler | Any state that drives downstream work | An exit rule per action and a small reconciler | Selected |
Every option is right under some premises. The verdict applies to the context above.
04Decision
For every automated action, declare its entry, its key and its exit: what happens to it when the record leaves the state or the population—close, exit, archive or keep—and with which reason. Check eligibility when the action executes, not only when it is triggered. Protect work in progress from automatic closure. Run a reconciler that finds and repairs exits that were missed.
05Consequences
What this choice changes elsewhere in the system.
- Business state
Downstream state follows the current state in both directions.
- Idempotency
Duplicates disappear because every action is keyed.
- Reconciliation
Missed exits are found by the reconciler, not by users.
- Design practice
Designing an automation now includes designing its end.
06Revisit when
The decision holds while its context holds. Challenge it when:
The action is purely informational and expires on its own.
The downstream system derives membership live from the source state.
07Where this decision is applied
The decision says why this path was chosen; each case shows how it takes part in a larger architecture.
08Related decisions
Decisions this one depends on, or constrains.
- ADR / 008Run reconciliation as a permanent control, not an exception processDelivery guarantees fail silently. A scheduled comparison of expected and actual populations—with an owner for every kind of difference—is part of the architecture, not cleanup.
- ADR / 009Model long-running automation as a run record with a state machineWhen automation spans steps, systems or days, give each run an identity, a state and step-level guards—so it can wait, fail, resume and finish exactly once.