ADR / 010

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.

Reference pattern

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

  1. D01

    States change in both directions

  2. D02

    Stale actions waste owners’ time and send wrong messages

  3. D03

    Reruns must not duplicate work

  4. D04

    Work in progress must not be discarded

03Options considered

Rejected

Entry automations only; periodic manual cleanup

States that never reverse

Cost: Drift accumulates; risky bulk edits
Rejected

Delete and recreate all actions each run

Tiny, stateless populations

Cost: Loses work in progress; churns records
Selected

Designed exits per action, plus a reconciler

Any state that drives downstream work

Cost: An exit rule per action and a small reconciler

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

  • Downstream state follows the current state in both directions.
  • Duplicates disappear because every action is keyed.
  • Missed exits are found by the reconciler, not by users.
  • Designing an automation now includes designing its end.

06Revisit when

01

The action is purely informational and expires on its own.

02

The downstream system derives membership live from the source state.

07Where this decision is applied

Cases that take this decision, and why it matters there.

  1. Automation case / 02Automating commercial actions from performance segmentationAn action matrix per segment with eligibility checked at execution time, one keyed action per account, segment and entry period, and designed exits that close what no longer applies.AutomationRevenue OperationsData & IntegrationsFictional scenario · 7 min
  2. Automation case / 06Designing a reconciler for stale downstream stateA scheduled reconciler that derives expected downstream state, compares it with what exists, and closes stale actions within guardrails—dry run, blast-radius limit, protected records and an owner review.AutomationData & IntegrationsRevenue OperationsFictional scenario · 7 min