Query Deals
query_dealsEvery result also carries the pipeline's stages (in order) and a pipeline_summary
(open count and amount, closing this month, won/lost counts, win rate) for the whole
pipeline — the summary ignores the filters.
Dict with paging info, the stages, the pipeline summary, and the deals page.
{total, has_more, stages: [{id, name, position}], pipeline_summary: {open_count,
open_amount, closing_this_month {count, amount}, won_count, lost_count, win_rate},
deals: [{id, name, amount (decimal string or null), status, stage {id, name,
position}, person_profile {id, name, title, email, linkedin_url, ...} or null,
company_profile {id, name, domain} or null, assignee_email, expected_close_date,
notes, created_at, stage_changed_at, closed_at (when it was won or lost; null while
open), archived_at, open_task_count, next_task {id, title, due_at} or null,
suggested_task, data}]}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Text match on the deal name, company name, or contact name. | |
| limit | No | Max deals (default 25, capped at 200). | |
| stage | No | Only deals in this stage, by name (e.g. "Proposal") or id. Open deals sit in a stage; won/lost is the status, not a stage. | |
| offset | No | Deals to skip for paging; re-call with offset += limit while has_more is true. | |
| status | No | 'open' (default), 'won', 'lost', or 'all'. | open |
| person_id | No | Only deals linked to this person (a query_people `id`). | |
| company_id | No | Only deals linked to this company (a query_companies `id`). | |
| assignee_email | No | Only deals owned by this teammate (an active teammate from list_teammates). |