> ## 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 entered Smart View

> Run when a lead enters a Close Smart View.

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

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

export default automation("On lead entered Close Smart View", () => {
  const event = close.onLeadEnteredSmartView({
    smartViewId: "save_abc123",
  })
  // Start work for the Close lead entering 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 }`. Automate.ax preserves the Smart View's query, sort, and result limit, fully reads each result set, and advances the baseline only after a complete successful observation.

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.
