Back to The Times of Claw

How to Track Your Key Sales KPIs in DenchClaw

Track sales KPIs in DenchClaw with live DuckDB dashboards. Monitor pipeline value, win rate, sales cycle length, and more—all from your local CRM.

Mark Rachapoom
Mark Rachapoom
·8 min read
How to Track Your Key Sales KPIs in DenchClaw

Tracking sales KPIs in most CRMs means waiting for a BI tool to refresh, exporting to a spreadsheet, or paying extra for a reporting add-on. In DenchClaw, your KPIs are SQL queries against a local DuckDB database that returns results in milliseconds. You can ask the AI agent for any metric, see it instantly, and save it as a live dashboard.

Here's how to set up the metrics that actually matter.

The Core Sales KPIs You Need#

Before building dashboards, agree on which numbers matter. The standard set for most sales teams:

  • Pipeline value — total $ value of open deals by stage
  • Win rate — closed-won deals as a percentage of all closed deals
  • Average deal size — mean value of closed-won deals
  • Sales cycle length — average days from lead to close
  • Activity metrics — calls made, emails sent, meetings booked per week
  • Conversion rates — lead → opportunity → close rates by stage
  • Revenue forecast — weighted pipeline by close probability

Step 1: Make Sure Your Deal Object Has the Right Fields#

Your KPIs are only as good as your underlying data. Check that your deals object has:

  • Deal Value (number) — in dollars or your currency
  • Stage (enum) — Discovery, Proposal, Negotiation, Closed Won, Closed Lost
  • Close Probability (number, 0-100) — for weighted pipeline
  • Created Date (date) — when the deal entered the pipeline
  • Close Date (date) — actual or expected close date
  • Closed At (date) — when it was marked Closed Won or Lost
  • Owner (text or relation to team members)

Ask DenchClaw to audit your current schema: "Check my deals object and tell me if I'm missing any fields needed to track win rate, average deal size, and sales cycle length."

Step 2: Query Your Pipeline Value#

This is your most-checked KPI. Run it on demand:

"What's my total pipeline value by stage this month?"

DenchClaw translates this to SQL:

SELECT "Stage", 
       COUNT(*) as deal_count,
       SUM(CAST("Deal Value" AS DECIMAL)) as total_value,
       AVG(CAST("Deal Value" AS DECIMAL)) as avg_value
FROM v_deals
WHERE "Stage" NOT IN ('Closed Won', 'Closed Lost')
GROUP BY "Stage"
ORDER BY total_value DESC

Results appear as a table and a bar chart. Ask for a weighted version:

"Show me weighted pipeline value—multiply deal value by close probability for each deal."

Step 3: Calculate Win Rate#

Win rate tells you how effective your sales process is. Ask:

"What's my win rate for deals closed this quarter?"

The agent queries:

SELECT 
    COUNT(CASE WHEN "Stage" = 'Closed Won' THEN 1 END) as won,
    COUNT(CASE WHEN "Stage" = 'Closed Lost' THEN 1 END) as lost,
    ROUND(100.0 * COUNT(CASE WHEN "Stage" = 'Closed Won' THEN 1 END) / 
          NULLIF(COUNT(CASE WHEN "Stage" IN ('Closed Won', 'Closed Lost') THEN 1 END), 0), 1) as win_rate_pct
FROM v_deals
WHERE "Closed At" >= DATE_TRUNC('quarter', CURRENT_DATE)

Track win rate over time: "Show me monthly win rate for the last 6 months as a line chart."

Step 4: Track Average Deal Size and Sales Cycle#

Average deal size helps you understand your revenue mix. Sales cycle tells you how long it takes to close:

"What's my average deal size and average sales cycle length for closed-won deals this year?"

For sales cycle length, DenchClaw calculates the difference between Created Date and Closed At in days, then averages across won deals.

These two metrics together tell you a lot. If deal size is going up but sales cycle is also lengthening, you might be moving upmarket faster than your process can handle.

Step 5: Build a Live KPI Dashboard#

Instead of asking these questions one at a time, build a dashboard that shows all your KPIs at once:

"Build a sales KPI dashboard app that shows: total pipeline value (number card), 
win rate this quarter (number card with comparison to last quarter), 
average deal size (number card), deals by stage (bar chart), 
and revenue closed per month this year (line chart). 
Pull all data from my deals object in DuckDB."

DenchClaw creates a .dench.app with a polished UI that queries your live DuckDB. It appears in your workspace sidebar as a tab you can open anytime. The data refreshes every time you open it.

Step 6: Set Up Activity Tracking KPIs#

Pipeline KPIs tell you about outcomes. Activity KPIs tell you about inputs—and inputs are what you can actually control day-to-day.

Create an activities object if you don't have one, then ask:

"Show me my activity metrics for this week: emails sent, calls logged, 
meetings booked, and LinkedIn outreach sent."

The agent queries your activities object and returns counts by type. Compare week-over-week: "Show me my weekly activity counts for the last 4 weeks as a table."

Step 7: Track Stage Conversion Rates#

This is your funnel analysis. Where are deals getting stuck?

"Show me conversion rates between each pipeline stage: 
what percentage of Discovery deals move to Proposal, 
Proposal to Negotiation, Negotiation to Close?"

To answer this properly, you need stage transition history. If your deals object has a Stage field but no history, ask DenchClaw to start logging stage changes:

"Whenever a deal's Stage field changes, log the previous stage, new stage, deal ID, and timestamp to a stage_history table."

Set this up now and you'll have meaningful funnel data within a few weeks.

Step 8: Set Up a Revenue Forecast#

Weighted pipeline is your most honest revenue forecast:

"Build a revenue forecast for this quarter. For each open deal, 
multiply Deal Value by Close Probability. Sum those for each month 
based on Expected Close Date. Show as a bar chart with this month, 
next month, and the month after."

For a more conservative forecast, use stage-based probabilities instead of deal-level ones:

"What's my revenue forecast if I use these probabilities: 
Discovery 10%, Proposal 30%, Negotiation 60%, Negotiation 80%?"

Step 9: Create a Weekly KPI Report#

Automate your weekly metrics review:

"Every Monday at 8am, generate a weekly KPI summary and send it to me 
on Telegram. Include: new deals this week, total pipeline value, 
win rate MTD, deals closing this week, and any deals with no activity 
in 7+ days."

This becomes a cron job in DenchClaw. You'll get a Telegram message every Monday morning before you open your laptop with a full snapshot of your pipeline health.

Step 10: Compare Team Performance#

If you're tracking an owner field on your deals:

"Show me win rate, average deal size, and deals in pipeline by owner, 
sorted by total pipeline value descending."

This surfaces performance differences without requiring a separate BI tool or manager dashboard. Everything you need is a SQL query away.

Key Metrics Reference#

Quick reference for the most common sales SQL patterns in DenchClaw:

KPIQuery Pattern
Total pipelineSUM(Deal Value) WHERE Stage NOT IN ('Won', 'Lost')
Win rateCOUNT(Won) / COUNT(Won + Lost)
Avg deal sizeAVG(Deal Value) WHERE Stage = 'Closed Won'
Sales cycleAVG(Closed At - Created Date) WHERE Stage = 'Closed Won'
Deals at riskStage != 'Closed' AND Last Activity > 14 days ago

Frequently Asked Questions#

Do I need to know SQL to track KPIs?#

No. You ask in plain English and DenchClaw writes the SQL. The agent translates natural language into DuckDB queries. You can see the SQL if you want to learn from it, but it's not required.

Can I set KPI targets and track against them?#

Yes. Create a targets object with your quarterly goals, then ask DenchClaw to show actuals vs targets in your dashboard. It's just a JOIN across two tables.

How often does the data update?#

Instantly. DenchClaw writes directly to the local DuckDB file, so every new deal, status change, or activity is immediately reflected in your queries and dashboards.

Can I share my KPI dashboard with my team?#

You can share a screenshot or export the data. Team-shared live dashboards require Dench Cloud sync, which is on the roadmap. For now, each team member runs their own instance.

What if I have historical data from a previous CRM?#

Import it first. Once it's in DuckDB, all your KPI queries work against the full historical dataset. The agent can handle data going back years.

Ready to try DenchClaw? Install in one command: npx denchclaw. Full setup guide →

Mark Rachapoom

Written by

Mark Rachapoom

Building the future of AI CRM software.

Continue reading

DENCH

© 2026 DenchHQ · San Francisco, CA