Measure Salesforce closed won plus commit against quota

Every Thursday: closed won and commit for the quarter against quota, the gap left, and how much of the quarter has already gone.

Runs
Thursdays at 16:00
For
Sales
Posts
Stat tile

From your apps to your board

How the skill works: your agent reads quota from Salesforce; quarterly quota from What you tell it, thursdays at 16:00, and gives you won + commit vs quota and the report in the chat.

Reads

  • SalesforceQuota
  • What you tell itQuarterly quota
reads
Your agentClaude Code, Codex, Cursor or GeminiThursdays at 16:00
posts

You get

  • Won + commit vs quotaA stat tile on your board, with its trend
  • The report in the chatEvery run, with or without Briefkin

What you get

  • Won plus commit as a share of quota, and the gap in dollars.
  • Closed won alone, next to the share of the quarter already gone.
  • By rep: quota, won, commit and coverage.
  • Commit deals by amount, with days to close and days since last activity, so stale commits show.

The card on the right is a sample. Yours shows your own numbers and updates in place every run.

What lands on your board

AcmeWon + commit vs quota86%+4% vs previous period, bettervs last report
Closed won$870k of $1.5M
Won + commit$1.29M of $1.5M
Quarter elapsedWeek 10 of 13
An example with made-up numbers. Your agent posts your real ones.

What it does

Before the Friday forecast call, every sales manager does the same arithmetic: closed won so far, plus what reps have in Commit, against the number the team signed up for. It takes a few report filters and a calculator, and it is easy to get wrong when a deal won this week still shows up in someone's commit spreadsheet.

The agent does the sum from SOQL each Thursday afternoon and posts won plus commit as a percent of quota. Under the number sit three bars: won, won plus commit, and how much of the quarter has passed, which is the comparison that tells you whether 70% is good news.

How it works

  1. 1Sum closed won

    SELECT Owner.Name, SUM(Amount) won FROM Opportunity WHERE IsWon = true AND CloseDate = THIS_FISCAL_QUARTER GROUP BY Owner.Name, then add the rows for the team total.

  2. 2Sum open commit

    SELECT Owner.Name, SUM(Amount) committed FROM Opportunity WHERE IsClosed = false AND ForecastCategoryName = 'Commit' AND CloseDate = THIS_FISCAL_QUARTER GROUP BY Owner.Name. Won deals carry the forecast category Closed, so nothing is counted twice.

  3. 3Get the quota

    If quotas live in Collaborative Forecasts, SELECT QuotaOwnerId, QuotaAmount, StartDate FROM ForecastingQuota WHERE StartDate = THIS_FISCAL_QUARTER for your forecast type (ForecastingTypeId), summed per rep. Otherwise use the quarterly quota written into the skill.

  4. 4

    4Work out the gap

    Attainment is won divided by quota; coverage is won plus commit divided by quota. Set both against the share of the quarter that has passed, and list the commit deals by amount with days to close and days since LastActivityDate.

  5. 5

    5Send the number

    Headline: won plus commit as a percent of quota. Glance: progress bars for won, won plus commit and quarter elapsed. Widget: the per-rep table and the commit deals, with any commit deal quiet for 14 days called out.

  6. Post it to the board

    With BRIEFKIN_TOKEN set, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.

Install and run it

Pick your agent, where the data comes from and how to schedule it; the commands below follow.

Agent
Data
Schedule
  1. Install the skill

    One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.

    shellcurl -fsSL https://briefkin.dev/skills/salesforce-forecast-vs-quota/install | sh
  2. Run it

    Ask Claude Code:

    promptRun the salesforce-forecast-vs-quota skill

    Or paste the prompt instead of installing:

    promptUsing SOQL on Salesforce, for this fiscal quarter: sum Amount of opportunities with IsWon = true, and of open opportunities with ForecastCategoryName = Commit, in total and per owner. Get quota from ForecastingQuota for the quarter if it exists; otherwise ask me for the quarterly quota. Report won plus commit as a percent of quota, won alone as a percent, the gap in dollars, and how far through the quarter we are. Show a per-rep table (quota, won, commit, coverage) and list commit deals by amount with days to close and days since LastActivityDate, flagging any with no activity in 14 days.
  3. Put it on a schedule

    Thursdays at 16:00, from cron on any machine where Claude Code is signed in:

    crontab0 16 * * 4 claude -p "Run the salesforce-forecast-vs-quota skill"

    Add it with crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.

  4. Send it to your board

    Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a stat tile. How setup works

View the SKILL.mdRaw file
SKILL.md---
name: salesforce-forecast-vs-quota
description: "Every Thursday: closed won and commit for the quarter against quota, the gap left, and how much of the quarter has already gone. Use when the user asks for this, or when it runs on a schedule."
---

# Salesforce forecast vs quota

Every Thursday: closed won and commit for the quarter against quota, the gap left, and how much of the quarter has already gone.

Before the Friday forecast call, every sales manager does the same arithmetic: closed won so far, plus what reps have in Commit, against the number the team signed up for. It takes a few report filters and a calculator, and it is easy to get wrong when a deal won this week still shows up in someone's commit spreadsheet.

The agent does the sum from SOQL each Thursday afternoon and posts won plus commit as a percent of quota. Under the number sit three bars: won, won plus commit, and how much of the quarter has passed, which is the comparison that tells you whether 70% is good news.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- Read access to Opportunity and, if quotas live in Collaborative Forecasts, to ForecastingQuota (a forecast manager, or a user with View All Forecasts).
- A way to run SOQL, such as `sf data query` or a Salesforce connector.
- The quarterly quota, if Salesforce does not store it.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Sum closed won** (Salesforce): `SELECT Owner.Name, SUM(Amount) won FROM Opportunity WHERE IsWon = true AND CloseDate = THIS_FISCAL_QUARTER GROUP BY Owner.Name`, then add the rows for the team total.
2. **Sum open commit** (Salesforce): `SELECT Owner.Name, SUM(Amount) committed FROM Opportunity WHERE IsClosed = false AND ForecastCategoryName = 'Commit' AND CloseDate = THIS_FISCAL_QUARTER GROUP BY Owner.Name`. Won deals carry the forecast category Closed, so nothing is counted twice.
3. **Get the quota** (Salesforce): If quotas live in Collaborative Forecasts, `SELECT QuotaOwnerId, QuotaAmount, StartDate FROM ForecastingQuota WHERE StartDate = THIS_FISCAL_QUARTER` for your forecast type (`ForecastingTypeId`), summed per rep. Otherwise use the quarterly quota written into the skill.
4. **Work out the gap**: Attainment is won divided by quota; coverage is won plus commit divided by quota. Set both against the share of the quarter that has passed, and list the commit deals by amount with days to close and days since `LastActivityDate`.
5. **Send the number**: Headline: won plus commit as a percent of quota. Glance: progress bars for won, won plus commit and quarter elapsed. Widget: the per-rep table and the commit deals, with any commit deal quiet for 14 days called out.

## Route B: the browser

### What you need

- Signed in to Salesforce as a forecast manager or a user with View All Forecasts, so team rows and the Quota column appear.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://login.salesforce.com/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Open the Forecasts tab**: After sign-in you are on your My Domain. From the App Launcher open **Forecasts**, choose the forecast type the team uses (usually Opportunity Revenue) and set the period to the current quarter.
2. **Read won and commit per rep**: Each rep row shows **Quota**, **Closed Only**, **Commit Forecast**, **Best Case Forecast** and **Open Pipeline**, with **Gap to Quota** when the admin enabled it; the top row is the team. If the Commit column is cumulative (the default) it already includes Closed, so read it as won plus commit; with individual category rollups, add Closed and Commit yourself.
3. **Use your own quota when the column is empty**: If Quota shows no value, quotas are not loaded in Salesforce. Use the quarterly number you keep, and build the sums in **Reports** instead: report type Opportunities, Close Date **Current FQ**, grouped by Opportunity Owner and Forecast Category with Sum of Amount.
4. **List the commit deals**: Click the team's Commit cell; the opportunity list under the grid shows each deal with Amount, Close Date and Owner. Add **Last Activity** from the column picker and flag deals with no activity in 14 days, then write won plus commit as a percent of quota next to the share of the quarter already gone.

Note: The Forecasts tab includes manager adjustments and currency conversion, so it can differ from a raw sum of Amount; the API route sums Amount as entered. Which columns show, and whether they are cumulative, is set by your admin under Forecasts Settings.

## The report

- **Won plus commit** as a share of quota, and the gap in dollars.
- **Closed won** alone, next to the share of the quarter already gone.
- **By rep**: quota, won, commit and coverage.
- **Commit deals** by amount, with days to close and days since last activity, so stale commits show.

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "salesforce-forecast-vs-quota/<date of this run, e.g. 2026-10-16>",
  "item_key": "salesforce-forecast-vs-quota",
  "project": "Acme",
  "source": "Salesforce forecast vs quota skill",
  "kind": "metric",
  "title": "Won plus commit at 86% of quota",
  "metric": {
    "label": "Won + commit vs quota",
    "value": 86,
    "unit": "%",
    "better": "higher",
    "period_start": "<start of the period, ISO 8601>",
    "period_end": "<end of the period, ISO 8601>"
  },
  "glance": [
    {
      "type": "Progress",
      "props": {
        "label": "Closed won",
        "value": 58,
        "text": "$870k of $1.5M",
        "tone": "ok"
      }
    },
    {
      "type": "Progress",
      "props": {
        "label": "Won + commit",
        "value": 86,
        "text": "$1.29M of $1.5M",
        "tone": "warn"
      }
    },
    {
      "type": "Progress",
      "props": {
        "label": "Quarter elapsed",
        "value": 77,
        "text": "Week 10 of 13",
        "tone": "neutral"
      }
    }
  ],
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Rep",
          "Quota",
          "Won",
          "Commit",
          "Won + commit"
        ],
        "align": [
          "left",
          "right",
          "right",
          "right",
          "right"
        ],
        "rows": [
          [
            "Marco",
            "$400k",
            "$241k",
            "$132k",
            "$373k (93%)"
          ],
          [
            "Dana",
            "$400k",
            "$262k",
            "$96k",
            "$358k (90%)"
          ],
          [
            "Priya",
            "$350k",
            "$198k",
            "$88k",
            "$286k (82%)"
          ],
          [
            "Sam",
            "$350k",
            "$169k",
            "$104k",
            "$273k (78%)"
          ]
        ]
      }
    },
    {
      "type": "Table",
      "props": {
        "columns": [
          "Commit deal",
          "Owner",
          "Amount",
          "Closes in",
          "Last activity"
        ],
        "align": [
          "left",
          "left",
          "right",
          "right",
          "right"
        ],
        "rows": [
          [
            "Contoso EMEA rollout",
            "Marco",
            "$132k",
            "12 days",
            "2 days ago"
          ],
          [
            "Woodgrove Bank",
            "Sam",
            "$104k",
            "19 days",
            "9 days ago"
          ],
          [
            "Relecloud renewal",
            "Dana",
            "$96k",
            "6 days",
            "1 day ago"
          ],
          [
            "Trey Research",
            "Priya",
            "$88k",
            "15 days",
            "22 days ago"
          ]
        ]
      }
    },
    {
      "type": "Callout",
      "props": {
        "text": "Gap to quota: $210k with 3 weeks left. Trey Research ($88k in Commit) has had no activity for 22 days.",
        "tone": "warn"
      }
    }
  ],
  "size": "md"
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

Set `period_start` and `period_end` to the window the number covers: the tile names it from them ("Last 7 days", "Today", "This month"). For a count right now (open items, a balance), send `"period_label": ""` so no period shows; for another name, send it as `period_label` (at most 24 characters).

## Run it on a schedule

Suggested: Thursdays at 16:00 (`0 16 * * 4`). From cron, with the agent signed in on that machine:

```bash
0 16 * * 4 claude -p "Run the salesforce-forecast-vs-quota skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/salesforce-forecast-vs-quota#schedule

Source: https://briefkin.dev/skills/salesforce-forecast-vs-quota

What your agent needs

  • Read access to Opportunity and, if quotas live in Collaborative Forecasts, to ForecastingQuota (a forecast manager, or a user with View All Forecasts).

  • A way to run SOQL, such as sf data query or a Salesforce connector.

  • The quarterly quota, if Salesforce does not store it.

Connecting Salesforce

  1. Salesforce Hosted MCP Servers. Salesforce runs MCP servers for your org; in Setup under MCP Servers, activate the read-only SObject Reads server and copy its URL. To use it from Claude, create an External Client App with OAuth (scopes mcp_api and refresh_token, callback https://claude.ai/api/mcp/auth_callback) and add the URL as a custom connector (server reference).
  2. The sf CLI. Log in once with sf org login web --alias prod, then run sf data query --query "SELECT Name, StageName, Amount, CloseDate FROM Opportunity WHERE IsClosed = false" --target-org prod --json. Salesforce's DX MCP server (npx @salesforce/mcp) reuses the same CLI login for local agents.
  3. REST API with OAuth. An External Client App with the api and refresh_token scopes; the skill reads SF_INSTANCE_URL and SF_ACCESS_TOKEN (or a refresh token) and calls the query endpoint.

SObject Reads and SOQL never write, but the user's permissions are the real limit: run reports as an integration user whose permission set grants Read on Opportunity, Account, Lead and Case and nothing else.

Questions

Why does won plus commit not match the Forecasts tab?

The Forecasts tab can include manager adjustments, a different forecast type or a converted currency. This skill sums the opportunity Amount as reps entered it. If you forecast on a custom amount field or on splits, swap Amount for that field in both queries.

What if our quotas are monthly?

ForecastingQuota has one row per rep per forecast period. With monthly periods the quarter has three rows per rep; the StartDate = THIS_FISCAL_QUARTER filter picks up all three and the skill adds them.

Do I need Briefkin to use the Salesforce forecast vs quota skill?

No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a stat tile, so you can glance at it instead of asking again.

Which agents can run it?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.

Can it work without an API or MCP server, from my browser?

Yes. Switch the data source to "Your browser" and the steps change to the Salesforce pages themselves: the agent opens login.salesforce.com in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.

Watch won + commit vs quota on your board, run after run

Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.

Free during the open beta. No card.