Build automated deal scoring for your CRM pipeline using AI. Three approaches: Claude connector (0 min), MCP (5 min), Python SDK (15 min).
Last updated: May 16, 2026
"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.
| Deal | Score | Band | Top reason |
|---|---|---|---|
| Acme Corp — Enterprise | 91 | Very good | Strong qualification + recent activity |
| Bright Inc — Pro | 78 | Good | Good company fit, needs more engagement |
| CloudNova — Starter | 42 | Medium | Missing decision-maker contact |
| DevStack LLC — Trial | 18 | Low | Stale — no activity in 30 days |
settings.json or Cursor MCP settings):
{
"mcpServers": {
"sanka": {
"type": "url",
"url": "https://mcp.sanka.com/mcp?apiKey=sk_test_YOUR_KEY"
}
}
}
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."
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."
pip install sanka-sdk
from sanka_sdk import Sanka
client = Sanka(api_key="sk_...")
# 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}")
# 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}}
]
})
| Metric | Before | After |
|---|---|---|
| Time spent on pipeline review | 2+ hours/week | 15 min — pre-scored, pre-sorted |
| Forecast accuracy | Gut feel + hope | Data-backed bands with reasons |
| Stale deals caught | When it's too late | Flagged automatically at score < 40 |
| Rep focus | Spread across all deals | Concentrated on high-score deals |