Exit rules prevent subscribers from receiving steps that are no longer appropriate. They are global guards evaluated before configured step boundaries, independently of the path currently being followed.

## Global exit rule or Exit step?

| Need                                                       | Use              |
| ---------------------------------------------------------- | ---------------- |
| Stop anyone who becomes a customer before later nurture    | Global exit rule |
| Stop anyone who unsubscribes or enters an excluded segment | Global exit rule |
| End only the No branch of one condition                    | Exit step        |
| Record a successful terminal outcome                       | Goal step        |

An **Exit step** is part of the graph. A global exit rule can affect every route repeatedly.

## Configure exit rules

Open **Settings > Exit** or select the **Exit conditions** rail on the canvas.

![Exit settings with mode, named rules, and subscriber filters](/docs/workflows/exit-rules.png)

1. Choose an exit mode.
2. Add a named exit condition.
3. Add one or more subscriber filters to that condition.
4. Add another condition when a separate reason should also stop the run.
5. Save the draft and publish a new version.

## Exit modes

| Mode              | When rules are checked                      | Typical use                                                     |
| ----------------- | ------------------------------------------- | --------------------------------------------------------------- |
| Disabled          | Never                                       | No global early-exit behavior                                   |
| Before email step | Immediately before each email               | Prevent inappropriate email while allowing non-email processing |
| Before each step  | Before emails, waits, actions, and branches | Stop the run as soon as it next advances                        |

Changing the mode does not interrupt a run in the middle of a currently executing step. The published definition is checked at the next applicable boundary for that run.

## AND and OR logic

- Every filter inside one named condition uses **AND**.
- Separate named conditions use **OR**.

Example:

```text
(tag is customer AND country is France)
OR
(tag is do-not-nurture)
```

The subscriber exits if either complete condition matches.

## Empty conditions are inactive

You may enable an exit mode before defining its filters. A condition with no filters is ignored, and an enabled mode with no active conditions exits nobody.

This makes it safe to prepare the setting incrementally, but it also means the mode label alone does not prove protection is active. Confirm that at least one named condition contains the intended filters before publishing.

## Runtime behavior

When a rule matches, Lumail:

1. Stops before the guarded step executes.
2. Cancels the active run.
3. Records an **Exited** timeline event with the matched rule context.
4. Prevents remaining emails and actions in that run.

Existing runs use the exit rules from the published version on which they enrolled. Editing the draft does not retrofit new rules into those runs.

## Exit step

Add an **Exit** node to terminate one explicit graph route. It has no outgoing edge and may store a reason such as `Not qualified` or `No engagement after 14 days`.

Reaching an Exit step completes the run as exited. It does not create a conversion goal.

## Common patterns

### Stop nurture after purchase

- Mode: Before email step
- Rule: `Already purchased`
- Filter: Customer tag belongs to any of `customer`, `paid`

### Stop all processing after opt-out

- Mode: Before each step
- Rule: `Do not nurture`
- Filter: Tag belongs to `do-not-nurture`

### End an unqualified path

Use a condition followed by an Exit step on **No**. Do not create a global rule when only that one route should stop.

## Related documentation

- [Goals](/docs/workflows/workflow-goals)
- [Manual enrollment](/docs/workflows/workflow-manual-enrollment) — entry bypass does not skip these rules
- [Branching](/docs/workflows/workflow-branching)
- [Publishing and Versions](/docs/workflows/workflow-publishing)
- [Test Runs and Timelines](/docs/workflows/workflow-testing)
