PranavNagrecha/AwesomeSalesforceSkills / skills/admin/collaborative-forecasts
collaborative-forecasts
VerifiedSet up, configure or troubleshoot Salesforce Collaborative Forecasts: forecast types, forecast categories, rollup methods, quota management, forecast hierarchy, manager adjustments, pipeline inspection integration. Trigger keywords: forecast type, forecast category, cumulative rollup, individual rollup, quota, forecast adjustment, forecast hierarchy, opportunity splits forecasting, pipeline forecast. NOT for configuring the opportunity stages, sales processes or split types themselves — use admin/opportunity-management. NOT for territory-based forecasting setup — use admin/enterprise-territory-management. NOT for Classic/Customizable Forecasting.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 36.4 KB |
| references/examples.md | markdown | 6.5 KB |
| references/gotchas.md | markdown | 22.4 KB |
| references/llm-anti-patterns.md | markdown | 8.5 KB |
| references/metadata-examples.md | markdown | 28.1 KB |
| references/well-architected.md | markdown | 12.8 KB |
| scripts/check_collaborative_forecasts.py | script | 38.8 KB |
| templates/collaborative-forecasts-template.md | markdown | 3.6 KB |
references/examples.md
View on GitHub# Examples — Collaborative Forecasts
## Example 1: Configuring Two Forecast Types for a Direct + Overlay Sales Model
**Context:** A SaaS company has two sales teams: Account Executives who own direct revenue, and Solutions Engineers who contribute to deals as overlays. Finance wants separate forecast views for each motion. The company uses Opportunity Revenue Splits to credit each rep.
**Problem:** Without separate Forecast Types, direct and overlay revenue are combined into a single forecast. Managers cannot see AE-attributable pipeline versus SE-attributed overlay separately. If a single Opportunity-based type is used, SE contributions are invisible.
**Solution:**
```
Forecast Type 1 — AE Direct Revenue
Source Object: Opportunity (Amount field)
Hierarchy: Role hierarchy
Period Type: Monthly
Rollup Method: Cumulative
Active: Yes
Forecast Type 2 — SE Overlay Splits
Source Object: Opportunity Splits (Revenue split type)
Hierarchy: Role hierarchy
Period Type: Monthly
Rollup Method: Cumulative
Active: Yes
```
Stage-to-category mapping (applies to both types — mapping is global):
```
Prospecting → Pipeline
Qualification → Pipeline
Needs Analysis → Pipeline
Value Proposition → Best Case
Id. Decision Makers → Best Case
Perception Analysis → Commit
Proposal/Price Quote → Commit
Negotiation/Review → Commit
Closed Won → Closed
Closed Lost → Omitted
```
Loading SE quotas for Forecast Type 2 via Data Loader:
```
Object: ForecastingQuota
Loadable fields:
QuotaOwnerId = <UserId of SE rep>
StartDate = 2025-01-01 (any day in the target month; stored as the 1st)
QuotaAmount = 50000 (QuotaQuantity instead, for a quantity type)
ForecastingTypeId = <Id of "SE Overlay Splits" ForecastingType>
CurrencyIsoCode = USD
Never load: PeriodId (read only), IsAmount, IsQuantity (derived from the type)
```
To retrieve the ForecastingTypeId before loading, and confirm the measure the type expects:
```soql
SELECT Id, DeveloperName, MasterLabel, IsActive, IsAmount, IsQuantity, CanDisplayQuotas
FROM ForecastingType
WHERE IsActive = TRUE
```
**Why it works:** Split-based types roll up only the split percentage credited to each rep, isolating SE overlay revenue from the AE's direct Amount. The two types appear as separate tabs on the Forecasts page. Cumulative rollup means the Commit column already includes Closed Won deals, which matches finance reporting expectations.
---
## Example 2: Diagnosing Missing Revenue After a Stage Mapping Change
**Context:** A sales ops admin added a new "Pilot" opportunity stage. After the update, the regional sales manager noticed roughly $2M of open pipeline disappeared from the forecast overnight.
**Problem:** The new "Pilot" stage was not explicitly mapped when created, so Salesforce assigned it to Omitted by default. Opportunities in the Pilot stage were excluded from all forecast rollup totals.
**Solution:**
1. Navigate to Setup > Forecasts Settings > Opportunity Stages in Forecasts.
2. Locate the "Pilot" stage in the mapping list.
3. Confirm it is mapped to Omitted (the default for newly created stages).
4. Change the mapping to the correct category — in this case, Best Case (represents active evaluation but not yet committed).
5. Save the mapping.
6. Refresh the Forecasts tab and confirm pipeline totals are restored.
In metadata terms the whole defect is one missing element on one standard value. This is the diff the release should have carried:
```diff
<standardValue>
<fullName>Pilot</fullName>
<default>false</default>
+ <forecastCategory>BestCase</forecastCategory>
<probability>40</probability>
</standardValue>
```
Confirm the blast radius before and after with the stage picklist itself, which is queryable:
```sql
-- Which stages are unmapped or Omitted, and how much open pipeline sits in each?
SELECT StageName, COUNT(Id) opps, SUM(Amount) openAmount
FROM Opportunity
WHERE IsClosed = FALSE AND ForecastCategoryName = 'Omitted'
GROUP BY StageName
ORDER BY SUM(Amount) DESC
-- The stage-to-category map as the platform sees it. Note the two vocabularies:
-- ForecastCategory returns 'Forecast' where ForecastCategoryName returns 'Commit'.
SELECT MasterLabel, ApiName, IsActive, IsClosed, IsWon,
ForecastCategory, ForecastCategoryName, DefaultProbability
FROM OpportunityStage
ORDER BY SortOrder
```
```
Before fix:
Pilot → (no forecastCategory) → Omitted (excluded from all rollups — $2M invisible)
After fix:
Pilot → BestCase in metadata → Best Case (feeds bestcaseforecast, and openpipeline,
which is Pipeline + Best Case + Most Likely + Commit)
```
**Why it works:** Forecast category mapping is applied to all open opportunities in real time. Once the stage is remapped to a non-Omitted category, those opportunities re-enter all forecast rollups immediately — no data migration or adjustment is required.
**The durable fix is the release, not the click.** Deploying `StandardValueSet: OpportunityStage` with the stage *and* its `forecastCategory` in one change makes the mapping reviewable in a pull request, which is where an unmapped stage is visible and Setup is where it is not. Note the metadata enum spelling while you are there: `BestCase`, and `Forecast` for the category everyone calls Commit — see `references/gotchas.md` Gotcha 10.
---
## Anti-Pattern: Changing Rollup Method on a Live Forecast Type
**What practitioners do:** An admin switches a Forecast Type from single-category to cumulative rollup mid-quarter because managers complain the Commit column does not include Closed Won deals.
**What goes wrong:** Salesforce immediately and permanently deletes all existing manager adjustments and owner adjustments for that Forecast Type. The deletion happens silently — no confirmation dialog, no notification to affected managers, no export of existing values. If the team had been building adjustments for 6 weeks, all of that data is lost with no undo.
**Correct approach:**
1. Export all existing adjustments from the `ForecastingAdjustment` object via Data Loader before making any rollup method change.
2. Schedule the change at a low-impact time (e.g., start of a new quarter before any adjustments have been entered).
3. Communicate the change to all forecast managers before execution.
4. After switching, use the exported adjustment data as a reference to re-enter critical values if needed.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |