filter_opportunities
Filter opportunities using structured conditions on milestone, value, close date, and tags. Find last won deals, opportunities closed this month, or pipeline deals at a specific milestone.
Instructions
Filter opportunities by structured conditions (milestone, value, close date, tags). Use this — not search_opportunities — for questions like 'last won deal', 'opportunities closed this month', 'pipeline X at milestone Y'. Capsule's API does not support ad-hoc sort, but for 'most recent X' you can filter by a date field (e.g. {field: 'closedOn', operator: 'is within last', value: 90}) and pick the highest-id row — Capsule IDs are monotonic, so newest id = newest record.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| conditions | Yes | Array of filter conditions. All conditions are ANDed together. To get newest records, use a date condition like {field: 'addedOn', operator: 'is within last', value: 7} and pick the highest-id row from the result (Capsule IDs are monotonic). | |
| embed | No | Comma-separated embeds, e.g. 'tags,fields' | |
| page | No | ||
| perPage | No |