Designing closed-loop automation from signal to action and exit
Not “when X, do Y”, but keeping downstream work true to a signal that keeps changing.
The case in brief
Current reality
The first automation handles only entry—“when an account becomes At Risk, create a task”. The signal keeps changing and nothing follows it, so stale tasks, old memberships, recovery work after recovery and duplicate actions accumulate.
What must become true
For every governed source state, the automation knows what should exist, what should change, what should be removed, what must remain untouched, what happens on re-entry and what may safely run again—and keeps the downstream state implied by the current business condition, not just the one implied by the first entry.
Design question
How does a changing business signal produce exactly the right downstream actions—and remove or change them when the signal no longer applies?
01The reality · current state
What the automation does today.
Accounts carry a governed performance signal—On Track, Underperforming, At Risk or No Sale—and an eligibility flag, published by the data platform. Each state should drive different follow-up: action memberships, a task for the owner, a recovery obligation, visibility in the management review. The first version reacted to the signal with a trigger that created actions on entry—and never removed, changed or checked any of them.
- Accounts that recovered still receive risk follow-up
- Old memberships remain after the signal has moved on
- Recovery work is created after the account has already recovered
- A rerun of the signal creates a second task
- Two states leave conflicting follow-up on the same account
- Accounts no longer eligible keep open actions
02Why the naïve version fails
What the first automation cannot answer.
The first version reacts to entry. The signal keeps changing; the downstream state does not follow—and every change leaves something behind.
- Stale tasksTasks created for a state the account has already left.
- Old membershipsAction memberships that keep running after the signal moved on.
- Recovery work after recoveryAn obligation opened for an account that is On Track again.
- Multiple actions after rerunsThe same signal processed twice creates the same work twice.
- Conflicting stateFollow-up from two states on one account, each correct when it was created.
- Actions for ineligible subjectsWork that stays open for accounts no longer in scope.
03Key dimension · Expected state, entry to exit & reconciliation
Expected state against actual state—then converge
The automation does not react to a change once. It maintains the downstream state the current signal implies, and compares it with what exists every time it runs.
- 01Source stateThe governed signal, as published and as of a date
- 02Expected action setWhat the current state implies downstream
- 03Actual action setWhat exists today, found by automation key
- 04DifferenceMissing · unexpected · wrong state · orphaned
- 05ConvergeCreate · update · remove · preserve · escalate
- Enter
What starts when an account enters a state?
Create the expected set once, keyed by Account + segment + entry period.
- Current
What changes while it stays there?
Update in place when an owner or a guard changes; never a second copy.
- Change
What happens when it moves to another state?
Close what only the old state required, create what the new one requires, keep what both require.
- Exit
What stops when it leaves?
Close or remove system-managed work with a reason; flag human work for review.
- Re-entry
What if it comes back later?
A new entry period: a new key and a fresh obligation; the earlier episode stays as history.
What each state implies downstream
| Source state | Should exist | Should not exist |
|---|---|---|
| At Risk |
|
|
| Underperforming |
|
|
| On Track |
|
|
| No Sale |
|
|
| No longer eligible |
|
|
Most duplicate and orphan problems are exit problems. Design the exit column first.
04Step contract
Each step with its mode, its actor and its guard.
A new version of the governed signal is published for an account.
- The actions the current state requires exist exactly once, keyed by Account + segment + entry period
- Actions the state no longer requires are closed or removed with a reason
- Human-authored work is preserved and flagged, never destroyed
- Differences are visible to the reconciler
Data platformCRMCampaign platform
- 01Signal published
A new version arrives with the previous and the current state, as of a date.
- 02Derive expected set
What the current state implies downstream, for this account.
- 03Read actual set
What exists today, found by automation key—not by name or date.
- 04Converge
Create what is missing, update what is wrong, close what is no longer expected, leave the rest.
- 05Owner review
Flagged human work and the recovery plan the state requires.
- 06Owner notification
One summary per owner per run, not one per record.
05Entry, update, exit & re-entry
Every automatic entry needs an automatic exit strategy.
Each transition says what is created, what is updated, what is closed or removed, what is preserved, who owns it and what guards it. Thresholds and names are illustrative.
| Transition | Create | Update | Close / remove | Preserve | Owner | Guard |
|---|---|---|---|---|---|---|
| No signal → At Risk | Recovery obligation; retention membership | — | — | Open seller tasks | Account owner | Eligible; active owner; no obligation for this entry period |
| At Risk → Underperforming | Review call | Management visibility level | Retention membership | The seller’s recovery plan | Account owner | Signal version newer than the one that created the obligation |
| At Risk → On Track | — | — | Recovery obligation as “recovered”; retention membership | Seller commitments and notes | Automation; the owner confirms | Signal version newer than the obligation’s |
| No Sale → active | — | — | Reactivation task and membership as “reactivated” | The opportunity the seller opened | Automation | Order confirmed in the governed model |
| Eligible → not eligible | — | — | Every system-managed membership and task, with a reason | Human-authored work, flagged for review | Automation; team lead for flagged work | Blast-radius limit |
| Not eligible → eligible | The current state’s expected set, with a new entry period | — | — | History from the earlier episode | Account owner | Eligibility re-checked at execution |
| Same state, next period | Nothing: the key already exists | Owner, if it changed | — | Everything open | — | Entry period unchanged |
06System vs human work
Automate the coordination, keep the judgement visible.
The automation may manage what it created. It must not destroy real work authored by people just because a signal changed. Ownership moves to a person the moment they touch the artifact.
| Artifact | Managed by | The automation may | It must not |
|---|---|---|---|
| Action membership | System | Create, update or remove it to match the expected state | Keep it after the state that required it has gone |
| Automated reminder task, untouched | System | Create it; close it with a reason when no longer expected | Reopen it silently |
| Task the seller has started or edited | Person | Flag it for review; suggest closing it | Close it because a segment changed |
| Recovery plan or customer commitment | Person | Prompt a review; link the new signal | Close, delete or rewrite it |
| Management review entry | System | Add or remove it with the state | Hide an obligation that is still open |
07Execution safety
If it can run twice, it is designed to run twice.
Changes arrive per account, but the downstream state spans two systems and several runs—and must stay correct whatever order they arrive in.
- Automation key
- Account + segment + entry period
- Eligibility guard
- Checked when the action runs, not only when it is triggered
- Ownership marker
- Every artifact records whether the automation or a person manages it
- Exit rule
- Leaving a state closes its system-managed actions with a reason
- Rerun
- Same state in, same downstream state out
- Notification
- Batched per owner and run
08Safe reruns
Same state in, same downstream state out.
The same source state will be processed again—after a retry, a recovery, a deployment, a backfill or a reconciliation. The result must not change, and nothing may be duplicated because a run executed twice.
Converge, don’t add
| The lookup by automation key finds | The automation |
|---|---|
| Nothing, but the state expects it | Creates it |
| It, in the wrong state or with the wrong owner | Updates it |
| It, no longer expected, system-managed | Closes or removes it with a reason |
| It, no longer expected, human-owned | Flags it for review |
| It, already correct | Does nothing |
When the same state is processed again
| Context | What keeps it safe |
|---|---|
| After a retry | The automation key: the second attempt finds what the first created |
| After a recovery | It works from the difference, not from the original event |
| After a deployment | Rules are versioned; the new version compares against expected state |
| After a backfill | The entry period comes from the signal, not from the date of the run |
| After a reconciliation | Repairs use the same keys the entry would have used |
09Reconciliation
The control loop: expected against actual, then repair only what is safe.
Reconciliation is the control loop of the automation, not a quarterly clean-up. Every day, after the signal is published, expected downstream state is compared with actual downstream state. The automation repairs only what is safe; anything else goes to a person.
| Key | Expected downstream | Actual downstream | Outcome |
|---|---|---|---|
ACC-A12 | Retention membership | Retention membership | MatchBoth sides agree. |
ACC-B07 | Recovery obligation | — | MissingMissing: the entry failed during an outage. |
ACC-C33 | No risk membership | Retention membership | UnexpectedUnexpected: the account recovered and the exit never ran. |
ACC-D19 | Not eligible | Reactivation membership | UnexpectedOrphaned: the account left the population; its automated membership stayed. |
ACC-E02 | Review call | Recovery call · in progress | DifferenceWrong state, but human-owned: the seller is working the call. |
ACC-F58 | Nurture membership | Growth membership | DifferenceWrong state, system-managed: a later signal was never applied. |
- Match
Downstream matches expected.
- Owner
- Nobody
- Action
- Record the check.
- Difference
Present, in the wrong state.
- Owner
- Automation or account owner
- Action
- Update if system-managed; flag for the owner if human-owned.
- Missing
Expected, not present.
- Owner
- Automation
- Action
- Auto-repair: create it with the key the entry would have used.
- Unexpected
Present, no longer expected—or orphaned.
- Owner
- Automation
- Action
- Auto-repair if system-managed and within the blast-radius limit; otherwise flag.
- Dry run first
A new rule reports what it would do for a period before it acts.
- Blast radius
An unusual share of closes holds the run for review.
- Protected work
Anything in progress or recently touched by a person is suggested, never closed.
- Reversibility
Every automated close carries a reason and the run ID, so it can be reopened.
10Failure & recovery
Not every failure is a retry.
- Owner inactive ConfigurationEligibility guardHolding queue for the team leadSales operations
- Campaign platform unavailable Dependency · retryConnection failuresQueue memberships; converge when it is backPlatform team
- Signal republished DuplicateAutomation key existsNo new effectsNobody: absorbed
- Account left the population Stale stateEligibility guard or reconcilerRun the exit rule; flag human workAutomation
- Signal publication late DependencyExpected state not readySkip the comparison; never reconcile against stale expectationsData team
- Unusual close volume ValidationBlast-radius limit exceededHold the run for reviewCommercial operations
11The trade-offs
Credible options, judged against these premises.
One-way triggers that create actions on entry
One-off actions that never need undoing
Cost: No exits; duplicates on rerun; drift nobody measuresRecreate every action on every run
Tiny populations with no human work attached
Cost: Churns memberships and tasks; destroys work in progressMaintain expected state, converge and reconcile
Signals that drive work in several systems
Cost: An action-matrix owner, ownership markers and a reconciler to runCriterion by criterion
Maintaining expected state costs more to design. It is justified when a signal changes over time, drives work in more than one system and sits next to work people author themselves.
| Criterion | One-way triggers | Recreate every run | Expected-state maintenance |
|---|---|---|---|
| Entry | Handled | Handled | Handled, keyed |
| Exit | Forgotten | Implicit, by deleting everything | Designed per transition |
| Rerun safety | Duplicates | Churn | Converges |
| Human work | Ignored | Destroyed | Preserved and flagged |
| Drift visibility | None | None | Reconciliation report |
| Design effort | Low | Low | Higher: matrix, keys and reconciler |
Design decision
Model automation as the maintenance of an expected downstream state rather than a series of one-way triggers; make entry, update, exit and re-entry explicit; treat system-managed and human-owned work differently; make every rerun converge; and run reconciliation as the control loop that repairs only what is safe to repair.
Every automatic entry needs an automatic exit strategy.
12The second layer
Questions that change the design.
Change
- What happens when the state changes?
- What happens when the account becomes ineligible?
- What happens when it comes back?
Safety
- Can a rerun create a duplicate?
- When is eligibility checked?
- What may the automation close without asking?
Ownership
- Who owns the exit path?
- When does an artifact become human-owned?
- Who reviews what reconciliation flags?
13Decisions & outputs
What the work produces.
- 01Expected-state model
- 02Entry, update, exit and re-entry matrix
- 03Ownership rules
- 04Automation keys
- 05Convergent rerun logic
- 06Reconciliation classes & guardrails
- 07Drift report