Auto-Score Every Deal in Your Pipeline with AI

Auto-score every deal in your pipeline using AI-powered qualification analysis. Three paths: Claude connector, MCP, and Python SDK.

Updated

April 4, 2026

Your rep says the deal is "looking good." Your VP wants a forecast by Friday. You open the pipeline and see 47 deals — but which ones actually have a shot at closing? Without a consistent scoring model, your pipeline review is just vibes. Deal scoring fixes this by applying the same criteria to every deal, every time — no gut feel required.

Here's how to auto-score every deal in your pipeline using AI, so your team focuses on what's real.

What you'll build

  1. Pull all open deals from your CRM pipeline
  2. Score each deal using AI-powered qualification analysis (engagement, data quality, company fit, pipeline progression)
  3. Tag deals by priority band — very good, good, medium, or low
  4. Surface the scores in your pipeline so reps and managers act on real signals

Total setup time: 0 min with the Claude connector, 5 min with MCP, 15 min with the SDK.

Path A: Use the Sanka connector in Claude (0 min)

No API key. No config. No code. Just a Claude conversation.

1. Connect Sanka

Go to Claude Settings → Connectors → find Sanka → click Connect. One-time OAuth login — Claude remembers your workspace after that.

2. Ask Claude what you want

"Score all open deals in my pipeline. Show me a ranked table with the deal name, score, band, and the top reason for each score."

That's it. Claude calls Sanka's scoring API behind the scenes, iterates through your deals, and returns a clean table.

3. See the results

Claude responds with something like:

DealScoreBandTop reason
Acme Corp — Enterprise91Very goodStrong qualification + recent activity
Bright Inc — Pro78GoodGood company fit, needs more engagement
CloudNova — Starter42MediumMissing decision-maker contact
DevStack LLC — Trial18LowStale — no activity in 30 days

You can follow up: "Email me a weekly summary of deals scored below 50" or "Create a workflow to re-score deals every Monday."


Path B: Build it in your IDE with MCP (5 min)

For developers using Claude Code, Cursor, or any MCP-compatible tool. Same scoring engine, but integrated into your dev workflow.

1. Connect Sanka MCP

Add this to your MCP config (Claude Code settings.json or Cursor MCP settings):

JSON
{
  "mcpServers": {
    "sanka": {
      "type": "url",
      "url": "https://mcp.sanka.com/mcp?apiKey=sk_test_YOUR_KEY"
    }
  }
}

2. Describe what you want

Paste this prompt into your agent:

Text
List all deals in stages discovery, proposal, and negotiation.
Score each deal using Sanka's scoring API.
Output a markdown table sorted by score descending, with columns:
deal name, company, stage, score, band, explanation.
Flag any deal scored below 40 as "needs attention."

3. See the results

The agent calls list_deals to fetch open deals, then calls the scoring tool for each one. You get a markdown table in your IDE, ready to paste into Slack or a standup doc.

You can extend this: "Write a Python script that runs this every Monday and posts the results to our #revenue-ops Slack channel."


Path C: Build it with the SDK (15 min)

For teams that want version control, CI/CD integration, or custom scoring logic. Full control, production-ready code.

1. Install the SDK

Bash
pip install sanka-sdk

2. Build it

Python
from sanka_sdk import Sanka

client = Sanka(api_key="sk_live_...")

# Fetch all open deals
deals = client.deals.list(page=1, limit=100)

scored_deals = []

for deal in deals.data:
    # Score each deal
    result = client.ai.score({
        "type": "deal",
        "deal_id": deal["id"]
    })

    scored_deals.append({
        "name": deal.get("name", "Untitled"),
        "company": deal.get("company", "—"),
        "stage": deal.get("stage", "—"),
        "score": result["score"],
        "band": result["band"],
        "explanation": result["explanation"],
    })

# Sort by score, lowest first (these need attention)
scored_deals.sort(key=lambda d: d["score"])

print(f"\n{'Deal':<30} {'Score':>5} {'Band':<10} {'Why'}")
print("-" * 80)
for d in scored_deals:
    flag = " ⚠" if d["score"] < 40 else ""
    print(f"{d['name']:<30} {d['score']:>5} {d['band']:<10} {d['explanation']}{flag}")

3. Automate it

Run this on a schedule using a cron job or Sanka workflows:

Python
# Wire it to a Monday morning cron
# crontab: 0 8 * * 1 python score_pipeline.py

# Or use Sanka workflows to trigger scoring
# when a deal moves to a new stage
workflow = client.workflows.create({
    "name": "Score deal on stage change",
    "trigger": {"type": "deal.stage_changed"},
    "actions": [
        {"type": "score_deal", "config": {"notify_if_below": 40}}
    ]
})

The impact

MetricBeforeAfter
Time spent on pipeline review2+ hours/week15 min — pre-scored, pre-sorted
Forecast accuracyGut feel + hopeData-backed bands with reasons
Stale deals caughtWhen it's too lateFlagged automatically at score < 40
Rep focusSpread across all dealsConcentrated on high-score deals

Next steps

Start scoring your pipeline → Try Sanka free

Related content

Back to blog