Use case

How to Analyze Win/Loss Using AI

Review historical sales outcomes, compare win rates with their denominators, and inspect recorded loss reasons using the metrics in your Cube deployment.

  • Define closed outcomes and the close-date window
  • Compare win rates with their denominators
  • Review recorded loss reasons and missing fields

What is win/loss analysis with AI?

Win/loss analysis compares opportunities that reached a closed-won or closed-lost outcome in a defined period. Sales and revenue operations teams can review the overall win rate and see how outcomes differ by account segment, lead source, or the last stage before close.

An AI agent can query modeled CRM metrics and summarize counts, but it cannot recover missing outcomes or explain a buyer's decision from a rate alone. This workflow reviews historical results; it does not replace interview-based win/loss research or predict future deals.

Start with defined CRM fields

Use a close-date field, final outcome, and unique opportunity grain that your team has approved. Keep segment and stage definitions consistent, and show missing loss reasons instead of inferring them.

Fictional examples for a Q2 2026 closed-opportunity review
MetricIllustrative example
Reporting windowClose date from 2026-04-01 inclusive through 2026-07-01 exclusive, in the fictional CRM's reporting time zone.
Closed outcomes240 unique opportunities: 72 closed-won and 168 closed-lost. Open records and unknown outcomes are excluded.
Overall win rate72 / (72 + 168) = 30.0%.
Win rate by segmentEnterprise: 24 / 60 = 40%; Mid-market: 36 / 120 = 30%; Small business: 12 / 60 = 20%.
Recorded loss reasons147 of 168 closed-lost opportunities have a standardized reason (87.5%); 21 have no reason recorded.
The Prompt

Copy. Paste. Run your win/loss review.

Connect to Cube via MCP or our CLI, then run the prompt below in your preferred agent.

Start with a Cube deployment connected to your data and a model containing the metrics you want to analyze.

01Connect over MCP

Connect over MCP

Connect your agent to your existing Cube deployment and sign in through OAuth.

MCP endpoint
https://cubecloud.dev/mcp
Sign in to Cube

Complete OAuth in your agent to connect your Cube account.

Choose a deployment

Use your default deployment or select another one available to your account.

Read the MCP setup docs
01Connect with CLI

Connect with CLI

Install the Cube CLI and sign in from a terminal-capable agent.

Install the CLI
curl -fsSL https://raw.githubusercontent.com/cube-js/cube/master/install-cli.sh | sh
Log in (replace TENANT with your account name)
cube login --url https://TENANT.cubecloud.dev
Inspect API operations
cube spec --json
Read the CLI docs

02Run this prompt in your agent

Choose your agent and copy the prompt below.

Prompt for Codex
Use the Cube MCP server connected in Codex and select the intended deployment. Run read-only analytics queries. Run a historical win/loss review using my connected Cube deployment. Use read-only requests and do not return customer names, opportunity names, or record identifiers. DEFINITIONSInspect the model and report the approved close-date field, final outcome values, unique opportunity grain, model time zone, and available segment, source, stage-history, and standardized loss-reason fields. Count each unique opportunity once. Include only records with a final closed-won or closed-lost outcome. If a required field or definition is missing, report the gap instead of substituting a guess. DATE WINDOWUse the three complete calendar months before the current calendar month in the model time zone: include the first day of the first month and exclude the first day of the current month. State the exact start date, exclusive end date, and time zone. Filter on close date, not create date. CALCULATIONS1. Count closed-won and closed-lost opportunities in the window. Calculate overall win rate as closed-won / (closed-won + closed-lost). Show the numerator and denominator; do not include open or unknown outcomes.2. Compare counts and win rates by the approved segment and source dimensions. Use segment and source values recorded for each opportunity at close when available. Recalculate the overall rate from pooled counts; do not average group rates. Show denominators and flag small groups.3. If stage history exists, compare outcomes by the last nonterminal stage recorded before close for both won and lost opportunities. Do not use a current-stage field as historical stage unless the model defines it that way.4. For closed-lost opportunities, count standardized loss-reason categories and separately count missing reasons. Do not infer a reason from notes or from the segment, source, or stage.5. Reconcile segment and source totals to the overall counts. Report excluded records and data-quality gaps when the available fields do not reconcile. OUTPUTReturn the exact date window, metric definitions, counts and rates with their numerators and denominators, the result tables, and concise observations. Keep all results aggregated and read-only. Distinguish recorded CRM categories from explanations of buyer decisions. Do not claim causal drivers or predict future outcomes from these historical results.

How it works

1

Confirm the close and outcome fields

Check the close-date field, reporting time zone, final outcome values, and unique opportunity ID. Use only closed-won and closed-lost records; flag duplicates or records whose outcome is missing.

2

Compare counts and win rates

Calculate the overall rate from closed-won divided by all closed outcomes, then break it down by segment, source, and the last stage before close when history is available. Show each denominator and compare counts alongside percentages.

3

Review recorded reasons

Summarize standardized loss reasons and report missing coverage separately. Use the result to choose a follow-up question for sales or RevOps; a CRM category can suggest where to investigate but does not establish why a deal was lost.

Compare closed outcomes by segment

This chart uses fictional Q2 2026 values to show win rates by segment and the completeness of recorded loss reasons. The worked example recalculates the same rates from closed wins and closed losses.

Worked example: fictional Q2 2026 closed opportunities by segment
Segment at closeClosed wonClosed lostTotal closedWin rate
Enterprise24366040%
Mid-market368412030%
Small business12486020%
Total7216824030%
  • The overall win rate is 72 / (72 + 168) = 30.0%. The denominator includes only unique opportunities with a closed-won or closed-lost outcome in Q2.
  • Enterprise has the highest rate at 40% (24 of 60). Mid-market has the largest number of losses: 84 of 168. Read the counts with the rates before choosing a segment to investigate.
  • 147 of 168 closed-lost opportunities have a standardized reason: 63 pricing, 42 missing capability, 21 no decision, and 21 other. Another 21 have no reason recorded; these categories describe CRM fields, not verified causes.

All values in this table and both images are fictional and hand-calculated for illustration. Historical close rates do not predict future deals or establish why an opportunity was won or lost; actual results depend on your model's outcome, close-date, segment, stage, and loss-reason definitions.

Frequently Asked Questions

Divide closed-won opportunities by all closed-won plus closed-lost opportunities in the same close-date window. For example, 72 wins and 168 losses give 72 / 240 = 30%. Keep open opportunities out of that historical closed-deal denominator.

Try Cube for free