> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On Close lead exited Smart View

> Run when a lead exits a Close Smart View.

`close.onLeadExitedSmartView` runs once for each lead that disappears between two completed observations of a Close Smart View.

```ts automations/on-close-lead-exited-smart-view.automation.ts theme={null}
import { automation } from "automate.ax"
import { close } from "automate.ax/close"

export default automation("On lead exited Close Smart View", () => {
  const event = close.onLeadExitedSmartView({
    smartViewId: "save_abc123",
  })
  // Stop work for the Close lead leaving the Smart View.
})
```

Provide a lead Smart View ID in `smartViewId`. Optional static `account` selects a named Close binding; the project binding is the default. Private and user-dependent views are evaluated with that exact connected Close user's permissions.

The initial observation establishes a baseline and does not emit existing leads. Later events return `{ leadId, smartViewId }`. The ID-only payload remains usable when the lead exited because it was deleted or became inaccessible.

Close does not provide native membership events. This trigger therefore observes differences between completed polls; a transient entry and exit entirely between polls cannot be observed. Close caps Advanced Filtering pagination at 10,000 results, so larger Smart Views fail rather than silently truncating. Legacy text-only and non-lead Smart Views are not supported.
