---
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
