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

# Analyze recent closed-won deals

> Use an agent and the Clay CLI to find patterns in recent successful deals.

Use the Clay plugin when you want an agent to inspect your Audiences deal data and support its analysis with the matching records.

<Note>Audiences must be enabled for your workspace.</Note>

<Card title="Install the Clay plugin" href="/quickstart#agent-plugin">
  Install the plugin and sign in.
</Card>

## Ask your agent

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
Check our closed-won deals since last week and look for patterns in what's working.
```

The agent can resolve available deal fields such as stage, close date, amount, and owner; fetch the deal records; and compare the recent closed-won set for recurring traits in those fields.

Deal searches cannot apply a saved segment or filter directly, so the agent pages through deal IDs, fetches their fields, and narrows the results locally:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay audiences fields list --entity-type deals
clay audiences records search-ids --entity-type deals
clay audiences records get --entity-type deals --ids 123,456
```

Ask the agent to report the exact date range it used and support each pattern with the matching deals.

## Next steps

<Card title="Audiences" href="/audiences">
  Learn how records, fields, segments, activities, and signals fit together.
</Card>

<Card title="Enrich leads and accounts" href="/use-cases/enrich-leads-and-accounts">
  Enrich records before you score, route, sync, or act on them.
</Card>
