How to Run Closed-Won Analysis with Claude Code
How Claude Code Turns Your CRM Data into Actionable Sales Strategies
Blogby JanFebruary 21, 2026

Most sales teams treat their CRM like a filing cabinet. Deals go in, statuses get updated, and when a deal closes, the record gets marked won or lost. Maybe someone writes a brief note about why. Then everyone moves on to the next quarter.
Sitting inside that filing cabinet is a dataset that could fundamentally change how your team sells. Every closed-won deal contains a story about what worked: which type of company bought, how they found you, what objections came up, how long the sales cycle took, what signals appeared before the deal accelerated, and which messaging landed. Every closed-lost deal contains an equally valuable story about what did not work. Together, they form a pattern that is almost impossible to see by reading deals one at a time but becomes obvious when you analyze them in aggregate.
The problem has never been awareness. Sales leaders know this data matters. The problem is that doing proper closed-won analysis is genuinely painful to do manually. You would need to export the CRM data, normalize inconsistent fields, cross-reference it with call transcripts, read through dozens of deal notes, categorize everything into something structured, and then somehow synthesize it all into actionable findings. That is a week of work, minimum. So it gets pushed to "next quarter" indefinitely.
Claude Code removes the bottleneck. It can ingest your full CRM export, read through every sales transcript, process previous outreach campaign data, and produce a structured analysis that identifies the specific patterns behind your wins and losses, all in a single session. More importantly, the output is not just a retrospective report. It is a set of buying signals that can be directly translated into enrichment workflows, turning historical insight into a repeatable system for finding the next set of companies most likely to buy.
Why Closed-Won Analysis Is the Highest-ROI Sales Activity Nobody Does
There is a reason Gartner keeps finding that the majority of sales organizations forecast at 70 to 79% accuracy despite having more data than ever. The data exists but nobody is actually analyzing it systematically. Reps update CRM fields inconsistently. Managers review deals anecdotally in pipeline meetings. And the deep, structured analysis that would reveal what truly predicts deal outcomes gets deprioritized because it takes too long.
The irony is that this analysis, when done well, has a compounding effect on everything else in your sales motion. A clear understanding of your closed-won patterns improves your ICP definition, which improves your targeting, which improves your messaging, which improves your win rate, which generates more data that makes the next round of analysis even better. It is the one activity that makes every other activity more effective.
Revenue intelligence platforms like Gong, Clari, and Aviso attempt to solve this with automated deal scoring and conversation analytics. They are useful tools, but they have two limitations. First, they analyze within the boundaries of their own data, primarily call recordings and email threads, without connecting to the broader context of your CRM history, outreach campaigns, and market data. Second, they give you scores and dashboards rather than the kind of nuanced, narrative analysis that reveals why certain deals close and others do not.
Claude Code fills a different niche. Instead of giving you a dashboard with numbers, it gives you an analyst who reads everything and writes up the findings. The output is not a 73 out of 100 deal score. It is a detailed explanation of what your winning deals have in common, how they differ from your losses, and what specific signals your team should be monitoring to find more companies that look like the ones that already bought.
What to Feed Claude Code
The quality of the analysis depends entirely on the quality of the inputs. Here is what to include, roughly in order of importance.
CRM deal records are the foundation. Export your closed-won and closed-lost opportunities from the past 18 to 24 months. Include every field you have: company name, industry, employee count, deal size, sales cycle length, lead source, deal stage history with timestamps, owner, and any custom fields your team tracks. The more fields, the more dimensions Claude Code can analyze across.
Sales call transcripts or notes add the qualitative layer that CRM fields cannot capture. If you use a conversation intelligence tool that transcribes calls, export those transcripts. If your reps write call notes in the CRM, include those. These contain the language buyers use when they are ready to move forward, the objections that kill deals, the value propositions that resonate, and the competitive dynamics that show up in real conversations.
Previous outreach campaign data matters more than most people expect. Which email sequences generated the deals that closed? What was the subject line, the hook, the call to action? What about the sequences that generated meetings but not closed deals? The gap between "got a response" and "got a deal" often reveals important qualification patterns.
Contact-level data rounds out the picture. Job titles and seniority of the primary buyer. Number of stakeholders involved. Whether there was a champion, and what their role was. Deals with VP-level buyers might close faster but at lower deal sizes, while director-level entry points might lead to larger enterprise deals with longer cycles. These patterns only emerge when you analyze across the full set.
Organize this in a simple folder structure on your machine. Claude Code reads files directly, so there is no copying and pasting needed. Drop the exports in, and the agent processes them from there.
The Analysis: What to Ask Claude Code to Find
This is where the real value lives. You are not just asking Claude Code to summarize your deals. You are asking it to find the patterns that predict future outcomes. Here are the specific analyses that produce the most actionable output.
Win Rate by Segment
Start broad. Ask Claude Code to calculate win rates broken down by every dimension in your data: industry, company size, deal size, lead source, sales cycle length, region, rep, and any custom segments you track. The goal is finding the segments where your win rate is disproportionately high or low compared to the average.
A B2B SaaS company might discover that their overall win rate is 25%, but their win rate among companies with 100 to 300 employees in the financial services vertical is 48%. That 23-point gap is not random. It tells you something meaningful about where your product fits best right now. Conversely, if your win rate drops to 8% among companies above 1,000 employees, that is equally valuable information because it tells you where to stop wasting effort.
Deal Velocity Patterns
Time kills deals, and the data almost always confirms it. Outreach's 2025 sales data report found that opportunities closed within 50 days had a 47% win rate, compared to 20% or lower beyond that threshold. Your data will have its own version of this pattern.
Ask Claude Code to analyze deal stage progression and identify where deals stall. Which stage transitions take the longest? Is there a point in the pipeline where deal probability drops sharply if the prospect does not advance within a certain number of days? These velocity patterns become qualification criteria. If your data shows that deals not reaching the proposal stage within 30 days almost never close, that becomes a concrete rule for how your team manages their pipeline.
Signal Identification
This is the analysis that many companies describe as the most valuable output of the entire process. You ask Claude Code to look at everything that happened before each closed-won deal and identify the common signals.
Did the company post relevant job openings in the months before the deal? Did they receive funding? Was there a leadership change? Did they announce a product launch or expansion? Were they mentioned in industry news for a specific reason? Were they engaging with competitor content on LinkedIn?
When you analyze 50 or 100 closed-won deals this way, patterns emerge. Maybe 60% of your wins came from companies that had posted a VP of Sales or RevOps role in the prior quarter. Maybe companies that recently switched their CRM closed at twice the normal rate. Maybe a specific combination of company size plus recent funding round plus active hiring turned out to predict 70% of your largest deals.
These are not abstract insights. They are trigger events that can be directly encoded into prospecting workflows. Once you know that "posted a sales leadership role in the last 90 days" is a strong predictor of closing, you can set up monitoring for exactly that signal and route matching companies into a high-priority outreach sequence.
Loss Pattern Analysis
The flip side matters just as much. Ask Claude Code to identify what your closed-lost deals have in common. Common loss patterns include specific company characteristics that look promising on paper but consistently fail to convert, objections that surface repeatedly in lost deal transcripts, competitive losses that cluster around specific product gaps, and deals that entered the pipeline through certain channels but rarely progressed past discovery.
Loss pattern analysis is uncomfortable but it produces some of the most actionable findings. If you discover that 40% of your lost deals cite integration complexity as the primary objection, that is a product feedback signal, a messaging adjustment signal, and a qualification signal all at once. You can adjust your outreach to pre-emptively address integration, disqualify prospects earlier when integration complexity is obviously high, and feed the pattern back to your product team with data to support it.
Messaging Effectiveness
If you included outreach campaign data, Claude Code can analyze which messages correlated with deals that actually closed versus deals that went nowhere. This goes beyond open rates and reply rates. A subject line might get high opens but attract the wrong prospects. A specific value proposition might generate fewer replies but higher quality conversations that convert.
The output here is a mapping of which messaging frameworks work for which segments. Your financial services prospects might respond to ROI-oriented messages while your tech startup prospects respond to speed and flexibility. These segment-specific messaging insights feed directly into how you structure outreach campaigns.
Turning Findings into Enrichment Workflows
Analysis without action is just a report that collects dust. The power of closed-won analysis is what happens after you have the findings.
Each buying signal you identify becomes a data point you can monitor and act on systematically. If your analysis reveals that companies switching CRM platforms are strong prospects, you need a workflow that detects CRM technology changes. If recently funded companies convert at higher rates, you need a workflow that monitors funding announcements. If companies posting specific types of job openings are your best leads, you need a workflow that scrapes job boards for those roles.
This is where the analysis connects to enrichment platforms. A tool like Databar can operationalize these signals through its data providers. You can use job scraping connectors to monitor for the specific roles your analysis identified as buying signals. You can track funding events through Crunchbase and PredictLeads integrations. You can detect technology changes through BuiltWith. You can pull LinkedIn company activity to monitor for content engagement patterns.
You can even run this enrichment directly from Claude Code using Databar's SDK, keeping everything in a single workflow. The analysis produces the signal definitions, and the SDK produces the prospect lists that match those signals, all without leaving the terminal.
The broader pattern is straightforward. Claude Code produces the intelligence. The enrichment platform, whether accessed through the SDK or the full interface, produces the leads that match. Your outreach team then contacts those leads with the messaging frameworks your analysis identified as most effective for that specific signal-segment combination.
Making This an Ongoing Practice
The biggest mistake teams make with closed-won analysis is treating it as a one-time project. You do it once, extract the insights, build some workflows, and then do not revisit it for a year. By then, your market has shifted, your product has changed, your sales motion has evolved, and the original insights may no longer hold.
The better approach is to run this analysis quarterly, or even monthly if your deal volume supports it. Each round of analysis incorporates the newest closed deals, checks whether previously identified patterns still hold, and surfaces emerging signals that were not visible in earlier data.
Claude Code makes this practical because the analysis setup is reusable. Once you have built your CLAUDE.md with the analysis methodology and created the folder structure for your data, running the analysis again is as simple as dropping in the latest CRM export and kicking off a new session. The heavy lifting of designing the analysis framework happens once. Every subsequent run is mostly execution.
Over time, this creates a feedback loop. Your analysis identifies signals. Your enrichment workflows monitor for those signals. Your outreach campaigns target the matching companies. The results of those campaigns, new closed-won and closed-lost deals, feed back into the next round of analysis, which refines the signals, which improves the workflows. Each cycle makes the entire system more accurate.
GTM agencies running this for multiple clients have an additional advantage. The patterns identified for one client in a specific industry inform hypotheses for other clients in similar industries. You do not start from zero each time. And because the CLAUDE.md can encode both the general methodology and client-specific configurations, scaling across clients does not require proportionally more analyst time.

What You Can Realistically Expect
Let me set honest expectations about what this workflow produces and what it does not.
It will find patterns you missed. This is nearly universal. When you analyze 50 or more deals across dozens of dimensions simultaneously, relationships emerge that are invisible to human intuition. Most teams discover at least two or three insights they did not have before, even teams that feel they know their market well.
It will confirm some things you already suspected. This is valuable because it gives you data to back up intuitions that were previously just opinions. "We think mid-market is our sweet spot" becomes "our win rate in the 100 to 500 employee segment is 42% versus 18% for enterprise" which is a much stronger basis for strategic decisions.
It will not replace sales judgment. Patterns in historical data reflect what happened, not necessarily what should happen. If your team has only sold to one industry, the analysis will tell you that industry is your ICP, even if you are perfectly capable of expanding to others. Claude Code identifies correlations, not root causes. A human strategist still needs to interpret the findings and decide which patterns to act on.
It gets better over time. The first analysis with a small dataset produces useful but preliminary findings. By the third or fourth quarterly analysis, with a growing dataset and a refined methodology, the insights become genuinely predictive.
The data enrichment workflows you build from these insights compound in the same way. Each cycle of analysis, enrichment, outreach, and measurement adds signal to your system. The companies you target become more precisely matched. The messaging becomes more relevant. The timing becomes more accurate. It’s a system that improves itself.
Run your first closed-won analysis with Claude Code this week. The CRM export takes five minutes. The analysis takes an hour. And the findings will change how you think about your pipeline.

FAQ
How many closed deals do I need for this analysis to be useful?
You can start with as few as 20 to 30 closed deals (both won and lost), though 50 or more produces noticeably more reliable patterns. Below 20, the sample size is too small to distinguish genuine patterns from noise. If you are a very early-stage company with limited deal history, focus on the qualitative analysis of call transcripts and outreach data rather than statistical segmentation.
What CRM export format works best?
CSV is the most universal and works well with Claude Code. Export from HubSpot, Salesforce, Pipedrive, or whatever CRM you use, making sure to include all available fields rather than just the default columns. More fields means more dimensions for analysis. If your CRM allows it, include deal stage history with timestamps, not just the current stage.
How is this different from the reports my CRM already generates?
CRM reports show you aggregated metrics: total deals, win rate, average deal size, pipeline value. They are descriptive. Claude Code analysis is investigative. It looks for the relationships between variables that standard reports do not surface. Your CRM can tell you that your win rate is 24%. Claude Code can tell you that your win rate is 48% among companies with 100 to 300 employees that entered the pipeline through content marketing and reached the proposal stage within 21 days. That level of specificity is what makes the output actionable.
Should I analyze won and lost deals separately or together?
Together. The value comes from the contrast. Analyzing wins in isolation tells you what worked, but you cannot distinguish between factors that actually predict winning versus factors that are simply common across all your deals. Including lost deals provides the comparison group that makes the patterns meaningful. If 80% of your wins were in financial services but 80% of your losses were also in financial services, industry is not actually a differentiating factor. You only see that when both sets are analyzed together.
Can an agency run this analysis for their clients, or does the client need to do it themselves?
Agencies are a natural fit for this. They bring the analytical methodology while the client provides the data. The analysis workflow is highly repeatable across clients since the same CLAUDE.md framework applies, with client-specific data swapped in for each engagement. Several GTM agencies are already offering closed-won analysis as a standalone service, using the insights to inform the enrichment workflows and outreach campaigns they build for their clients.
Related articles

Claude Code for RevOps: How Revenue Operations Teams Are Using AI Agents to Fix CRM Data, Automate Pipeline Ops & Build Systems
Using AI Agents to Fix CRM Data and Streamline Revenue Operations for Scalable Growth
by Jan, February 24, 2026

Claude Code for Sales Managers: A Practical Guide to Deal Reviews, Rep Coaching, Pipeline Inspection, and Forecast Prep in 2026
Speed Up Coaching and Forecast Prep with Data You Can Trust
by Jan, February 23, 2026

How to Build a Client Onboarding System in Claude Code for GTM Agencies
How To Cut Client Onboarding from Weeks to Hours with Claude Code
by Jan, February 22, 2026

How to Automate GTM Research with Claude Code
How Claude Code Cuts Weeks of GTM Research into Hours Without Sacrificing Depth
by Jan, February 20, 2026


