4 large deals changed yesterday, one slipped a quarter
4 deals over $50,000 changed. Northwind's $180,000 renewal moved from December to January, and Umbrella went to Closed Lost.
Each morning: Salesforce opportunities over your threshold that changed stage, amount or close date yesterday, with who changed what.
Reads
You get
The card on the right is a sample. Yours shows your own numbers and updates in place every run.
What lands on your board
4 deals over $50,000 changed. Northwind's $180,000 renewal moved from December to January, and Umbrella went to Closed Lost.
In a pipeline review, the surprise is never a new deal. It is the six-figure renewal whose close date quietly moved into next quarter two weeks ago, or the amount someone trimmed after a call. Salesforce records every one of those edits, but nobody reads field history unprompted.
The agent reads it for you each morning, for deals above the amount you set: stage moves, amount changes and close date pushes from yesterday, with the old and new value and who made the edit. Leaders hear about a slipping deal while there is still time to help.
Run SELECT OpportunityId, Opportunity.Name, Opportunity.Amount, Opportunity.Owner.Name, Field, OldValue, NewValue, CreatedDate, CreatedBy.Name FROM OpportunityFieldHistory WHERE Field IN ('StageName', 'Amount', 'CloseDate') AND CreatedDate = YESTERDAY ORDER BY OpportunityId, CreatedDate with sf data query or the REST query resource. On Mondays, use CreatedDate >= <Friday>T00:00:00Z AND CreatedDate < TODAY to cover the weekend.
If field history tracking is off for those fields, query OpportunityHistory instead (StageName, Amount, PrevAmount, CloseDate, PrevCloseDate, CreatedDate = YESTERDAY) and compare each row with the one before it for the stage.
Keep an opportunity when its current amount or the old amount in the change is at or above your threshold (default $50,000), so a deal cut from $120,000 to $40,000 still shows. Merge several edits to one deal into one line.
Stage forward, stage back, closed won, closed lost, amount up or down (with the difference), and close date pushed or pulled in. Mark a close date that moved into a later quarter.
Losses and quarter slips first, then cuts, then good news. One line per deal with amount, the change, the owner and who made the edit.
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.
Pick your agent, where the data comes from and how to schedule it; the commands below follow.
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-large-deal-changes-alert/install | shAsk Claude Code:
promptRun the salesforce-large-deal-changes-alert skillOr paste the prompt instead of installing:
promptUsing SOQL against my Salesforce org, read OpportunityFieldHistory for yesterday (since Friday if today is Monday) where Field is StageName, Amount or CloseDate, with the opportunity name, current amount, owner, old and new values and who made the change. If field history is not tracked, use OpportunityHistory with PrevAmount and PrevCloseDate instead. Keep opportunities whose current or previous amount is at least $50,000. List losses and close dates pushed into a later quarter first, then amount changes with old and new values, then stage moves and wins, one line per deal with the owner and the editor.Weekdays at 8:00, from cron on any machine where Claude Code is signed in:
crontab0 8 * * 1-5 claude -p "Run the salesforce-large-deal-changes-alert 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.
Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a report card. How setup works
SKILL.md---
name: salesforce-large-deal-changes-alert
description: "Each morning: Salesforce opportunities over your threshold that changed stage, amount or close date yesterday, with who changed what. Use when the user asks for this, or when it runs on a schedule."
---
# Salesforce large deal changes alert
Each morning: Salesforce opportunities over your threshold that changed stage, amount or close date yesterday, with who changed what.
In a pipeline review, the surprise is never a new deal. It is the six-figure renewal whose close date quietly moved into next quarter two weeks ago, or the amount someone trimmed after a call. Salesforce records every one of those edits, but nobody reads field history unprompted.
The agent reads it for you each morning, for deals above the amount you set: stage moves, amount changes and close date pushes from yesterday, with the old and new value and who made the edit. Leaders hear about a slipping deal while there is still time to help.
## 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 OpportunityFieldHistory, and field history tracking on Stage, Amount and Close Date (Object Manager > Opportunity > Fields & Relationships > Set History Tracking).
- Salesforce's hosted SObject Reads MCP server (its `soqlQuery` tool, read-only), the `sf` CLI logged in to the org, or REST API OAuth credentials.
If something is missing, say what and stop; do not invent numbers.
### Steps
1. **Read yesterday's field history** (Salesforce): Run `SELECT OpportunityId, Opportunity.Name, Opportunity.Amount, Opportunity.Owner.Name, Field, OldValue, NewValue, CreatedDate, CreatedBy.Name FROM OpportunityFieldHistory WHERE Field IN ('StageName', 'Amount', 'CloseDate') AND CreatedDate = YESTERDAY ORDER BY OpportunityId, CreatedDate` with `sf data query` or the REST query resource. On Mondays, use `CreatedDate >= <Friday>T00:00:00Z AND CreatedDate < TODAY` to cover the weekend.
2. **Fall back without history tracking** (Salesforce): If field history tracking is off for those fields, query `OpportunityHistory` instead (`StageName`, `Amount`, `PrevAmount`, `CloseDate`, `PrevCloseDate`, `CreatedDate = YESTERDAY`) and compare each row with the one before it for the stage.
3. **Keep the large deals**: Keep an opportunity when its current amount or the old amount in the change is at or above your threshold (default $50,000), so a deal cut from $120,000 to $40,000 still shows. Merge several edits to one deal into one line.
4. **Classify each change**: Stage forward, stage back, closed won, closed lost, amount up or down (with the difference), and close date pushed or pulled in. Mark a close date that moved into a later quarter.
5. **Post the list**: Losses and quarter slips first, then cuts, then good news. One line per deal with amount, the change, the owner and who made the edit.
## Route B: the browser
### What you need
- Signed in to Salesforce with a user who has the Run Reports and Create and Customize Reports permissions and can see the opportunities (sharing rules apply to reports).
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 a field history report**: Sign-in lands in your org (a custom domain redirects on its own). Open **Reports** from the App Launcher, click **New Report**, and pick the report type **Opportunity Field History** under Opportunities. If it is not offered, history tracking is off; use **Opportunity History** instead.
2. **Set the filters**: Filters: **Edit Date** equals `Yesterday` (on Mondays, a custom range from Friday to yesterday), **Field / Event** equals `Stage`, `Amount`, `Close Date`, and **Amount** greater or equal `50000`. Add the columns Opportunity Name, Amount, Opportunity Owner, Field / Event, Old Value, New Value and Edited By.
3. **Run and save it**: Click **Run**, group rows by Opportunity Name, and save the report as "Large deal changes yesterday" so the next run only opens it. Export it if it runs past 2,000 rows, the on-screen cap.
4. **Classify and post**: Stage forward or back, closed won or lost, amount up or down with the difference, close date pushed or pulled in, and a mark on dates that moved into a later quarter. Losses and quarter slips first, then cuts, then good news, one line per deal with owner and editor.
Note: The Amount filter uses the current amount, so a deal cut from $120,000 to $40,000 drops out; add a second filter on Old Value, or lower the threshold, if that matters. Field history exists only from the day tracking was turned on. Opportunity History has stage, amount and close date without the editor's name on every row.
## The report
- **Count** of large deals that changed yesterday.
- **Lost and slipped**: closed lost, or close date moved to a later quarter.
- **Amount changes** with old and new values.
- **Stage moves** and wins.
- Each line names the owner and who made the edit.
## 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-large-deal-changes-alert/<date of this run, e.g. 2026-10-16>",
"item_key": "salesforce-large-deal-changes-alert",
"project": "Acme",
"source": "Salesforce large deal changes alert skill",
"kind": "update",
"title": "4 large deals changed yesterday, one slipped a quarter",
"summary": "**4 deals over $50,000** changed. Northwind's **$180,000** renewal moved from December to January, and Umbrella went to Closed Lost.",
"widget": {
"type": "Table",
"props": {
"columns": [
"Opportunity",
"Amount",
"Change",
"Owner"
],
"align": [
"left",
"right",
"left",
"left"
],
"rows": [
[
"Northwind - Enterprise renewal",
"$180,000",
"Close date Dec 15 to Jan 30 (next quarter)",
"Dana Ruiz"
],
[
"Umbrella - Annual plan",
"$64,000",
"Negotiation to Closed Lost",
"Dana Ruiz"
],
[
"Initech - 400 seats",
"$72,000",
"Amount cut from $120,000",
"Lee Park"
],
[
"Globex - Platform expansion",
"$96,000",
"Proposal to Negotiation",
"Sam Okafor"
]
]
}
}
}
JSON
```
Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.
## Run it on a schedule
Suggested: Weekdays at 8:00 (`0 8 * * 1-5`). From cron, with the agent signed in on that machine:
```bash
0 8 * * 1-5 claude -p "Run the salesforce-large-deal-changes-alert 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-large-deal-changes-alert#schedule
Source: https://briefkin.dev/skills/salesforce-large-deal-changes-alert
Read access to Opportunity and OpportunityFieldHistory, and field history tracking on Stage, Amount and Close Date (Object Manager > Opportunity > Fields & Relationships > Set History Tracking).
Salesforce's hosted SObject Reads MCP server (its soqlQuery tool, read-only), the sf CLI logged in to the org, or REST API OAuth credentials.
mcp_api and refresh_token, callback https://claude.ai/api/mcp/auth_callback) and add the URL as a custom connector (server reference).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.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.
OpportunityFieldHistory only records fields with history tracking turned on, and only from the day it was turned on. Check Set History Tracking on the Opportunity object. Without it, the skill uses OpportunityHistory, which Salesforce keeps for stage, amount and close date automatically but with less detail.
Yes. Set the amount in the skill, and add tracked fields such as ForecastCategoryName or NextStep to the Field IN (...) list. Changes to Probability usually follow stage changes, so they are left out to keep the list short.
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 report card, so you can glance at it instead of asking again.
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.
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.
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.