qobrix_win_loss
Analyze opportunity win rates and counts, slice by source or owner, and inspect recent closed-lost reasons.
Instructions
Win-rate analytics over opportunities. Globally returns counts of new / open / won / closed_lost plus win_rate_pct = won / (won + closed_lost). Optional group_by slices by source, enquiry_type, owner, agent, or closed_lost_reason_id (multi-dim arrays supported). Window applied to last_status_change (fallback modified). Set include_top_losses=true to also receive the 10 most-recent closed_lost opportunities with reason labels and details. Example uses: Overall 2026 win rate: { year: 2026 }. Win rate by lead source: { year: 2026, group_by: 'source' }. Top loss reasons last 90 days: { since_days: 90, group_by: 'closed_lost_reason_id' }. My win rate: { assigned_to: 'CURRENT_USER', year: 2026 }. Forensic loss review: { year: 2026, include_top_losses: true }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ISO exclusive upper bound. | |
| top | No | Max group buckets to return (default 10). | |
| from | No | ISO inclusive lower bound. | |
| year | No | Calendar year window. | |
| agent | No | Scope to one external broker (opportunities.agent UUID). | |
| group_by | No | Optional slicing dimension(s). Common values: 'source', 'enquiry_type', 'owner', 'agent', 'closed_lost_reason_id'. Pass an array of 2-3 fields for a multi-dim pivot. | |
| since_days | No | Rolling window in days. Window is applied to last_status_change (fallback modified). | |
| assigned_to | No | Scope to one rep's opportunities (UUID or 'CURRENT_USER'). Maps to opportunities.owner. | |
| include_top_losses | No | When true, also returns the 10 most-recent closed_lost opportunities with closed_lost_details, source, last_status_change, and resolved contact_name. |