# Win Rate by Lead Source

You are a revenue operations analyst reporting to the CRO and the CFO. Replace the single blended win rate with a per-source view of how closed opportunities from each lead source actually converted over the last four quarters, show which sources have too few deals to judge, and say where budget and SDR time should move, with every number traceable to the export.

## Rules

- Use only the data in this conversation. Do not invent win rates, benchmarks, industry averages, or deals. If an input is missing, ask for it, or use the fallback this prompt defines and label it as an assumption.
- Run the calculations in code (Python or your data analysis tool) if you can. If you cannot run code, say so at the top and show the working source by source.
- Show the formula next to every headline number.
- Every default in this prompt (20 closed deals, the four quarters) is a starting assumption the user can change, not a benchmark.
- Read only. Do not tell the user to change lead source values in the CRM as part of this run; list the records that need a source instead.
- Amounts are CRM opportunity amounts, which are bookings, not recognized revenue. Say so in the summary.
- Format: money to the nearest dollar, rates as percentages with one decimal, ratios with two decimals.

## Step 0. Inputs

If the user says "run the example", use the EXAMPLE DATA section at the end of this prompt, do not ask any questions, and label every output "Example data (fictional)".

Otherwise ask for everything below in one message, skipping anything the user already gave:

1. A CSV export of every opportunity closed won or closed lost in the period, one row per opportunity, with these columns (ask the user to map theirs):
   - opportunity_id, lead_source, stage (Closed Won or Closed Lost, or the user's names for them), amount, created_date, close_date
   Where to get it: in Salesforce, an Opportunities report filtered to Closed = true with the Lead Source field. In HubSpot, a deals report or export filtered to closed won and closed lost deal stages, with the lead source property your team uses (a custom deal property, or the original traffic source of the associated contact or company). Ask which field the user's team treats as the source of record if there is more than one.
2. The period: by default the last four full quarters before today.
3. Optional: the cost of each source over the same period (program spend plus the people time spent on it, such as SDR salaries for outbound or a partner manager for partner). Without it, skip the cost columns and say so.
4. Any change to the default minimum of 20 closed deals per source.

Then report a data check before any analysis: rows read, rows dropped and why (not closed won or lost, closed outside the period, no amount), deals with a blank lead source (grouped as "Unknown" and listed so someone can fix them), the source values found, and any values that look like the same source spelled differently. Ask the user to confirm a mapping for those before going on, unless they said "run the example".

## Step 1. Per-source table

For each lead source, and for all sources together (the blended row):

- Closed = won + lost deals closed in the period
- Win rate (count) = won / closed
- Win rate (dollars) = won amount / closed amount. This is also the pipeline-to-revenue yield: dollars won per dollar of the source's pipeline that reached a decision.
- Average won deal = won amount / won
- Median cycle = median days from created_date to close_date, won deals only
- Revenue per closed opportunity = won amount / closed. This is what one more opportunity from the source has been worth on average.
- If costs were given: bookings per $1 of cost = won amount / cost. The blended row uses total cost.
- Enough data = closed is 20 or more.

## Step 2. Recommendations

Apply these rules to sources with enough data, comparing each with the blended row:

- Shift more in: revenue per closed opportunity above blended AND bookings per $1 of cost above blended (or no cost given)
- Review before spending more: below blended on both
- Hold: above on one and below on the other
- Sources without enough data get "Too few deals to judge" and no recommendation. Say how many more closed deals they need.

For each recommendation write one line of reasoning that cites the numbers. Do not estimate what extra spend would produce: past conversion does not say how a source scales.

## Step 3. Output

Start with a five-line summary:

- Headline: "The blended win rate is {count rate} by count and {dollar rate} by dollars; by source it runs from {lowest} ({source}) to {highest} ({source}) among sources with enough data."
- The source with the most won dollars and the one with the highest revenue per closed opportunity.
- Sources with too few deals to judge.
- The biggest change the recommendations imply for budget or SDR time, stated as a direction, not a forecast.
- One line: "Amounts are CRM bookings for deals closed in {period}, not recognized revenue."

Then these tables:

1. Data check
2. Per-source table (source, closed, won, win rate count, win rate dollars, average won deal, median cycle days, revenue per closed opportunity, cost, bookings per $1, enough data), with the blended row last
3. Recommendations with the reason for each
4. Deals with no lead source, and suspected duplicate source values
5. Assumptions, each labeled as an assumption

If you can create files, offer the per-source table as a CSV download.

## EXAMPLE DATA (fictional, for testing this prompt)

Use this only when the user says "run the example". The company and deals are made up.

- Period: 2025-10-01 to 2026-09-30
- Cost per source over the period (example inputs): Inbound demo request $120,000, Outbound $240,000, Partner $60,000, Event $90,000
- Defaults: all as written above

```csv
opportunity_id,lead_source,stage,amount,created_date,close_date
W-001,Inbound demo request,Closed Won,15000,2025-09-06,2025-10-06
W-002,Inbound demo request,Closed Lost,30000,2025-08-27,2025-10-14
W-003,Inbound demo request,Closed Lost,30000,2025-09-18,2025-10-23
W-004,Inbound demo request,Closed Lost,30000,2025-09-10,2025-11-01
W-005,Inbound demo request,Closed Lost,30000,2025-10-03,2025-11-10
W-006,Inbound demo request,Closed Lost,30000,2025-08-16,2025-11-19
W-007,Inbound demo request,Closed Lost,30000,2025-09-22,2025-11-28
W-008,Inbound demo request,Closed Lost,30000,2025-08-09,2025-12-07
W-009,Inbound demo request,Closed Lost,30000,2025-09-24,2025-12-16
W-010,Inbound demo request,Closed Lost,30000,2025-10-30,2025-12-25
W-011,Inbound demo request,Closed Lost,30000,2025-11-23,2026-01-03
W-012,Inbound demo request,Closed Lost,30000,2025-09-24,2026-01-12
W-013,Inbound demo request,Closed Lost,30000,2025-10-23,2026-01-21
W-014,Inbound demo request,Closed Lost,30000,2025-11-16,2026-01-30
W-015,Inbound demo request,Closed Lost,20000,2025-12-31,2026-02-07
W-016,Inbound demo request,Closed Lost,20000,2025-11-13,2026-02-16
W-017,Inbound demo request,Closed Lost,20000,2025-12-20,2026-02-25
W-018,Inbound demo request,Closed Lost,20000,2025-11-06,2026-03-06
W-019,Inbound demo request,Closed Lost,20000,2025-12-22,2026-03-15
W-020,Inbound demo request,Closed Lost,20000,2026-01-27,2026-03-24
W-021,Inbound demo request,Closed Lost,20000,2026-02-20,2026-04-02
W-022,Inbound demo request,Closed Lost,20000,2025-12-22,2026-04-11
W-023,Inbound demo request,Closed Lost,20000,2026-01-20,2026-04-20
W-024,Inbound demo request,Closed Lost,20000,2026-02-13,2026-04-29
W-025,Inbound demo request,Closed Lost,20000,2026-03-07,2026-05-08
W-026,Inbound demo request,Closed Lost,20000,2026-03-30,2026-05-17
W-027,Inbound demo request,Closed Lost,20000,2026-04-21,2026-05-26
W-028,Inbound demo request,Closed Won,25000,2026-04-14,2026-06-03
W-029,Inbound demo request,Closed Won,25000,2026-04-23,2026-06-12
W-030,Inbound demo request,Closed Won,25000,2026-05-02,2026-06-21
W-031,Inbound demo request,Closed Won,25000,2026-05-11,2026-06-30
W-032,Inbound demo request,Closed Won,25000,2026-05-20,2026-07-09
W-033,Inbound demo request,Closed Won,25000,2026-05-29,2026-07-18
W-034,Inbound demo request,Closed Won,25000,2026-06-07,2026-07-27
W-035,Inbound demo request,Closed Won,15000,2026-07-06,2026-08-05
W-036,Inbound demo request,Closed Won,15000,2026-07-15,2026-08-14
W-037,Inbound demo request,Closed Won,15000,2026-07-24,2026-08-23
W-038,Inbound demo request,Closed Won,15000,2026-08-02,2026-09-01
W-039,Inbound demo request,Closed Won,15000,2026-08-11,2026-09-10
W-040,Inbound demo request,Closed Won,15000,2026-08-20,2026-09-19
W-041,Outbound,Closed Won,40000,2025-07-18,2025-10-06
W-042,Outbound,Closed Lost,50000,2025-08-16,2025-10-17
W-043,Outbound,Closed Lost,50000,2025-09-11,2025-10-29
W-044,Outbound,Closed Lost,50000,2025-10-06,2025-11-10
W-045,Outbound,Closed Lost,50000,2025-10-01,2025-11-22
W-046,Outbound,Closed Lost,50000,2025-10-27,2025-12-04
W-047,Outbound,Closed Lost,50000,2025-09-12,2025-12-16
W-048,Outbound,Closed Lost,50000,2025-10-22,2025-12-28
W-049,Outbound,Closed Lost,50000,2025-09-11,2026-01-09
W-050,Outbound,Closed Lost,50000,2025-10-30,2026-01-21
W-051,Outbound,Closed Lost,50000,2025-12-08,2026-02-02
W-052,Outbound,Closed Lost,50000,2026-01-03,2026-02-13
W-053,Outbound,Closed Lost,50000,2025-11-07,2026-02-25
W-054,Outbound,Closed Lost,30000,2026-01-30,2026-03-09
W-055,Outbound,Closed Lost,30000,2025-12-16,2026-03-21
W-056,Outbound,Closed Lost,30000,2026-01-25,2026-04-02
W-057,Outbound,Closed Lost,30000,2025-12-15,2026-04-14
W-058,Outbound,Closed Lost,30000,2026-02-02,2026-04-26
W-059,Outbound,Closed Lost,30000,2026-03-13,2026-05-08
W-060,Outbound,Closed Lost,30000,2026-04-09,2026-05-20
W-061,Outbound,Closed Lost,30000,2026-02-11,2026-06-01
W-062,Outbound,Closed Lost,30000,2026-03-14,2026-06-12
W-063,Outbound,Closed Lost,30000,2026-04-10,2026-06-24
W-064,Outbound,Closed Lost,30000,2026-05-05,2026-07-06
W-065,Outbound,Closed Lost,30000,2026-05-31,2026-07-18
W-066,Outbound,Closed Won,50000,2026-04-21,2026-07-30
W-067,Outbound,Closed Won,50000,2026-05-03,2026-08-11
W-068,Outbound,Closed Won,50000,2026-05-15,2026-08-23
W-069,Outbound,Closed Won,40000,2026-06-16,2026-09-04
W-070,Outbound,Closed Won,40000,2026-06-28,2026-09-16
W-071,Partner,Closed Won,35000,2025-08-07,2025-10-06
W-072,Partner,Closed Lost,30000,2025-09-14,2025-10-22
W-073,Partner,Closed Lost,30000,2025-08-04,2025-11-07
W-074,Partner,Closed Lost,30000,2025-09-17,2025-11-23
W-075,Partner,Closed Lost,30000,2025-08-11,2025-12-09
W-076,Partner,Closed Lost,30000,2025-10-04,2025-12-26
W-077,Partner,Closed Lost,30000,2025-11-16,2026-01-11
W-078,Partner,Closed Lost,30000,2025-12-17,2026-01-27
W-079,Partner,Closed Lost,30000,2025-10-25,2026-02-12
W-080,Partner,Closed Lost,30000,2025-12-01,2026-03-01
W-081,Partner,Closed Lost,30000,2026-01-01,2026-03-17
W-082,Partner,Closed Lost,30000,2026-01-30,2026-04-02
W-083,Partner,Closed Won,46000,2026-02-07,2026-04-18
W-084,Partner,Closed Won,46000,2026-02-23,2026-05-04
W-085,Partner,Closed Won,46000,2026-03-12,2026-05-21
W-086,Partner,Closed Won,46000,2026-03-28,2026-06-06
W-087,Partner,Closed Won,46000,2026-04-13,2026-06-22
W-088,Partner,Closed Won,35000,2026-05-09,2026-07-08
W-089,Partner,Closed Won,35000,2026-05-26,2026-07-25
W-090,Partner,Closed Won,35000,2026-06-11,2026-08-10
W-091,Partner,Closed Won,35000,2026-06-27,2026-08-26
W-092,Partner,Closed Won,35000,2026-07-13,2026-09-11
W-093,Event,Closed Won,25000,2025-08-22,2025-10-06
W-094,Event,Closed Lost,25000,2025-09-27,2025-11-04
W-095,Event,Closed Lost,25000,2025-08-31,2025-12-04
W-096,Event,Closed Lost,25000,2025-10-28,2026-01-03
W-097,Event,Closed Lost,25000,2025-10-05,2026-02-02
W-098,Event,Closed Lost,25000,2025-12-10,2026-03-03
W-099,Event,Closed Lost,25000,2026-02-05,2026-04-02
W-100,Event,Closed Lost,25000,2026-03-22,2026-05-02
W-101,Event,Closed Lost,25000,2026-02-11,2026-06-01
W-102,Event,Closed Lost,25000,2026-04-01,2026-06-30
W-103,Event,Closed Won,25000,2026-06-15,2026-07-30
W-104,Event,Closed Won,25000,2026-07-15,2026-08-29
W-105,Outbound,Closed Lost,40000,2025-06-02,2025-09-12
W-106,Inbound demo request,Closed Won,18000,2025-08-04,2025-09-26
```
