[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69A0YKB9JM4CAKMJNV4KMZB":3,"skill-same:01M69A0YKB9JM4CAKMJNV4KMZB":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":17,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M69A0YKB9JM4CAKMJNV4KMZB","forecast","销售预测报告生成","Generates a weighted sales forecast from Dataverse opportunity data. Calculates committed, best-case, and pipeline views by rep and team; compares to quota; flags risks and upside. Use when user asks \"what's my forecast\", \"quarterly forecast\", \"pipeline forecast\", \"where's my number\", \"forecast report\", \"am I going to hit quota\", \"sales projection\", or \"revenue forecast\".","基于 Dataverse 商机数据生成加权销售预测。按销售代表和团队计算承诺值、最佳情况和销售管道视图；与销售配额进行对比；标记风险与增长空间。当用户询问“我的预测”“季度预测”“管道预测”“我的业绩数字”“预测报告”“我能完成配额吗”“销售预测”或“营收预测”时使用。","microsoft\u002Fdataverse-business-skills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69A0CN12Y1G6WKSVKNHX60T",54,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fdataverse-business-skills\u002Fblob\u002Fmain\u002Fskills\u002Fforecast\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BYVVCA63CVD73VFEZJ2R3G","销售赋能与运营","SCENARIO","使用场景",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BYVVCTDDM7AKZ2R5HBDEEJ","销售代表","PROFESSION","适用职业",[5,31,32],"dataverse","analytics","2026-11-10 10:12:30",false,"---\nname: forecast\ndescription: Generates a weighted sales forecast from Dataverse opportunity data. Calculates committed, best-case, and pipeline views by rep and team; compares to quota; flags risks and upside. Use when user asks \"what's my forecast\", \"quarterly forecast\", \"pipeline forecast\", \"where's my number\", \"forecast report\", \"am I going to hit quota\", \"sales projection\", or \"revenue forecast\".\nmetadata:\n  author: Dataverse\n  version: 1.0.0\n  category: sales-analytics\n---\n\n# Forecast\n\nSales forecasting requires aggregating pipeline data across reps, applying probability weighting, and identifying where the number is at risk or has upside. This skill automates that process from Dataverse opportunity records — producing a structured forecast with committed, best-case, and pipeline totals broken down by owner and by forecast category, with risk and upside annotations.\n\n## Instructions\n\n### Step 1: Define Forecast Parameters\nAccept input from the user:\n- **Period:** Current quarter (default), next quarter, current month, or custom date range\n- **Scope:** Individual rep, team\u002Fmanager rollup, or full organization\n- **Owner filter:** Specific systemuserid, team, or all\n- **Currency:** Use organization default\n\nCalculate period boundaries:\n- **Current quarter start\u002Fend** based on today's date and fiscal calendar\n- **Period start:** `[quarter_start]T00:00:00Z`\n- **Period end:** `[quarter_end]T23:59:59Z`\n\n#### Step 2: Fetch Open Opportunities in Period\n```\nSELECT opportunityid, name, estimatedvalue, estimatedclosedate, closeprobability,\n       salesstage, msdyn_forecastcategory, ownerid, customerid, accountid,\n       budgetstatus, decisionmaker, need, purchasetimeframe, purchaseprocess,\n       createdon, modifiedon, description\nFROM opportunity\nWHERE statecode = 0\nAND estimatedclosedate >= '[period_start]'\nAND estimatedclosedate \u003C= '[period_end]'\nORDER BY ownerid, estimatedvalue DESC\n```\n\nApply owner filter if specified.\n\n#### Step 3: Fetch Already-Closed Deals in Period\n**Won this period (actuals):**\n```\nSELECT opportunityid, name, estimatedvalue, actualclosedate, ownerid, customerid\nFROM opportunity\nWHERE statecode = 1\nAND actualclosedate >= '[period_start]'\nAND actualclosedate \u003C= '[period_end]'\nORDER BY ownerid, actualclosedate DESC\n```\n\n**Lost this period (for win rate context):**\n```\nSELECT COUNT(opportunityid) as lost_count, SUM(estimatedvalue) as lost_value, ownerid\nFROM opportunity\nWHERE statecode = 2\nAND actualclosedate >= '[period_start]'\nAND actualclosedate \u003C= '[period_end]'\nGROUP BY ownerid\n```\n\n#### Step 4: Segment by Forecast Category\nGroup open opportunities by `msdyn_forecastcategory`:\n\n**Forecast category values:**\n| Code | Label | Description |\n|------|-------|-------------|\n| 100000001 | Pipeline | Early stage, uncertain |\n| 100000002 | Best Case | Possible with favorable conditions |\n| 100000003 | Committed | Rep has high confidence in close |\n| 100000004 | Omitted | Excluded from forecast |\n| 100000005 | Won | Already closed won (use for actuals) |\n| 100000006 | Lost | Already closed lost |\n\nFor each category, calculate:\n- Count of opportunities\n- Total value (sum of estimatedvalue)\n- Weighted value (sum of estimatedvalue × closeprobability \u002F 100)\n\nRun separate queries per category:\n\n**Committed:**\n```\nSELECT COUNT(opportunityid) as count, SUM(estimatedvalue) as total,\n       ownerid\nFROM opportunity\nWHERE statecode = 0\nAND msdyn_forecastcategory = 100000003\nAND estimatedclosedate >= '[period_start]'\nAND estimatedclosedate \u003C= '[period_end]'\nGROUP BY ownerid\n```\n\nRepeat for Best Case (100000002) and Pipeline (100000001).\n\n#### Step 5: Calculate Weighted Forecast\nFor each opportunity, compute:\n- **Committed:** Use full estimatedvalue (rep has high confidence)\n- **Best Case:** estimatedvalue × closeprobability \u002F 100\n- **Pipeline:** estimatedvalue × closeprobability \u002F 100\n\n**Total forecast by rep:**\n- Forecast = Won (actuals) + Committed (full value) + Best Case (weighted)\n- Upside = Pipeline weighted value above Committed + Best Case\n- Gap to quota = Quota − Forecast (if quota data available)\n\n**Note:** Quota data may be stored in `msdyn_quotas` or `msdyn_forecastconfiguration` if Sales Insights forecasting is enabled. Query if available:\n```\nSELECT msdyn_forecastdefinitionid, msdyn_forecastdefinitionname, msdyn_quotasource\nFROM msdyn_forecastdefinition\nWHERE statecode = 0\n```\n\nIf quota is not in Dataverse, accept as a user-provided input.\n\n#### Step 6: Check Forecast Accuracy Signals\n\nFor each deal in Committed category, validate:\n\n**Red flags (may deflate number):**\n- No activity in last 7 days (check activitypointer)\n- Close date in current week but stage is Qualify or Develop\n- Budget not confirmed (budgetstatus = 0 or 1)\n- Decision maker not identified (decisionmaker = false\u002Fnull)\n- Close date has slipped before (compare createdon to estimatedclosedate gap)\n\n**Upside signals (may inflate number):**\n- Deal in Best Case with strong qualification (BANT score ≥ 8\u002F10)\n- Deal with recent positive activity (meeting or call in last 3 days)\n- Accelerated stage velocity (moved two stages in less than 2 weeks)\n\n#### Step 7: Calculate Activity Recency for Each Deal\nFor each Committed and Best Case opportunity:\n```\nSELECT TOP 1 activityid, activitytypecode, actualend, subject\nFROM activitypointer\nWHERE regardingobjectid = '[opportunityid]'\nAND statecode = 1\nORDER BY actualend DESC\n```\n\nFlag if last activity > 7 days ago for Committed deals.\n\n#### Step 8: Generate Forecast Report\n\n```\nSALES FORECAST REPORT\nPeriod: Q[n] [Year] ([Start Date] – [End Date])\nScope: [Rep Name \u002F Team \u002F Organization]\nGenerated: [Today's Date]\n═══════════════════════════════════════════════════════════\n\nPERIOD SUMMARY\n───────────────────────────────────────────────────────────\nQuota:            $[quota]\nWon (Actuals):    $[won_value]    ([n] deals)\nCommitted:        $[committed]    ([n] deals)\nBest Case:        $[best_case_w]  ([n] deals, weighted)\nPipeline:         $[pipeline_w]   ([n] deals, weighted)\n─────────────────────────────────────────────\nTotal Forecast:   $[won + committed + best_case_weighted]\nUpside Potential: $[pipeline_weighted]\nForecast vs Quota: [n]% | [Gap: $X above\u002Fbelow]\n\nFORECAST BY REP\n───────────────────────────────────────────────────────────\nRep Name          | Quota    | Won     | Commit  | Best    | Fcst    | vs Quota\n[Rep 1]           | $[quota] | $[won]  | $[com]  | $[bc]   | $[tot]  | [+\u002F-n]%\n[Rep 2]           | $[quota] | $[won]  | $[com]  | $[bc]   | $[tot]  | [+\u002F-n]%\n\nCOMMITTED DEALS ([n] deals, $[value])\n───────────────────────────────────────────────────────────\n? [Deal Name] — $[Value] | [Stage] | Close: [Date] | Rep: [Name]\n   Last activity: [n] days ago | BANT: [score]\u002F10\n\n⚠️  [Deal Name] — $[Value] | [Stage] | Close: [Date] | Rep: [Name]\n   ⚠️ No activity in 14 days | Budget not confirmed\n\nBEST CASE DEALS ([n] deals, $[weighted_value] weighted)\n───────────────────────────────────────────────────────────\n[Deal Name] — $[Value] ([prob]%) = $[weighted] | [Stage] | Close: [Date]\n...\n\nPIPELINE (Unweighted: $[value] | Weighted: $[weighted])\n───────────────────────────────────────────────────────────\n[n] deals in pipeline category for period\nTop 3 by value: [Deal 1], [Deal 2], [Deal 3]\n\nFORECAST RISKS\n───────────────────────────────────────────────────────────\n? [Deal Name] — $[Value] | Committed but no activity in [n] days\n? [Deal Name] — $[Value] | Close date today, stage = Qualify\n? [Deal Name] — $[Value] | Budget unconfirmed, in Committed\n\nUPSIDE OPPORTUNITIES\n───────────────────────────────────────────────────────────\n⬆️  [Deal Name] — $[Value] | Best Case, BANT 9\u002F10, meeting 2 days ago\n⬆️  [Deal Name] — $[Value] | Pipeline, strong qualification, close date pull-in possible\n\nRECOMMENDED ACTIONS\n───────────────────────────────────────────────────────────\n1. [Rep Name] — call [Deal Name] today; no activity in [n] days, closes this week\n2. Move [Deal Name] from Committed to Best Case — budget not confirmed\n3. Accelerate [Deal Name] — strong signals, could be a pull-in to this quarter\n═══════════════════════════════════════════════════════════\n```\n\n### Output Format\nDeliver a three-part output:\n1. **Executive summary** — one-line forecast vs quota\n2. **Tabular rep rollup** — every rep's committed \u002F best case \u002F forecast vs quota\n3. **Deal-level detail** — Committed and Best Case deals with health signals, risks, and upside\n\n### Example Interaction\n\n**User Input:**\n\"Generate the Q1 2026 forecast for the West team.\"\n\n**Skill Output:**\n```\nSALES FORECAST — Q1 2026 | West Team\n═══════════════════════════════════════════════════════════\nQuota: $1,200,000\nWon (Actuals): $380,000 (32% attainment)\nCommitted: $420,000 | Best Case: $180,000 (w) | Pipeline: $95,000 (w)\nTotal Forecast: $980,000 — 82% of quota\nGap to close: $220,000\n\nFORECAST BY REP\n─────────────────────────────────────────────────────\nSarah J.  | $400K quota | $150K won | $180K commit | Fcst: $370K | 93%\nMike P.   | $400K quota | $120K won | $140K commit | Fcst: $295K | 74% ⚠️\nLisa C.   | $400K quota | $110K won | $100K commit | Fcst: $245K | 61% ?\n\nRISKS\n? Northwind ($85K, Committed) — no activity 12 days, close date March 3\n? Fabrikam ($42K, Committed) — budget unconfirmed\n\nUPSIDE\n⬆️ Alpine Ski ($65K, Best Case) — BANT 9\u002F10, meeting yesterday\n```\n\n### Dataverse Tables Used\n| Table | Purpose |\n|-------|---------|\n| `opportunity` | Pipeline data, categories, and values |\n| `activitypointer` | Activity recency per deal |\n| `account` | Account name for display |\n| `systemuser` | Rep names and rollup |\n| `msdyn_forecastdefinition` | Quota data (if Sales Insights enabled) |\n\n### Key Fields Reference\n**opportunity:**\n- `estimatedvalue` (MONEY) - Deal value\n- `estimatedclosedate` (DATE) - Expected close\n- `closeprobability` (INT) - Win probability % (0-100)\n- `msdyn_forecastcategory` (CHOICE) - Pipeline(100000001), Best Case(100000002), Committed(100000003), Omitted(100000004), Won(100000005), Lost(100000006)\n- `salesstage` (CHOICE) - Qualify(0), Develop(1), Propose(2), Close(3)\n- `statecode` (STATE) - Open(0), Won(1), Lost(2)\n- `ownerid` (LOOKUP) - Assigned rep (systemuser)\n\n### Configurable Parameters\n- Forecast period (default: current quarter)\n- Committed weighting method (full value vs probability-weighted)\n- Activity recency alert threshold for Committed deals (default: 7 days)\n- Minimum deal size to include in report (default: $0)\n- Quota source (Dataverse table or user-provided input)\n- Coverage ratio warning threshold (default: below 3x pipeline to quota)\n\n## Examples\n\n### Example 1: Personal Forecast\n\n**User says:** \"What's my forecast for this quarter?\"\n\n**Actions:**\n1. Determine current quarter boundaries\n2. Query open opportunities for current user\n3. Segment by forecast category\n4. Calculate weighted totals\n5. Flag risks and upside\n\n**Result:**\n```\nQ1 2026 FORECAST - Sarah Johnson\n\nQUOTA: $400,000\n\nACTUALS (Won): $150,000 (38%)\nCOMMITTED: $180,000\nBEST CASE: $65,000\nPIPELINE: $120,000\n\nWEIGHTED FORECAST: $370,000 (93%)\nGAP TO QUOTA: $50,000\n\nRISKS:\n? Northwind ($85K) - no activity 12 days\n? Fabrikam ($42K) - budget unconfirmed\n\nUPSIDE:\n⬆️ Alpine Ski ($65K) - BANT 9\u002F10, strong momentum\n```\n\n### Example 2: Team Forecast Rollup\n\n**User says:** \"Show me the team forecast\"\n\n**Actions:**\n1. Query all reps reporting to current user (or team)\n2. Aggregate opportunities by owner\n3. Compare each rep to quota\n4. Generate team summary with risk indicators\n\n**Result:**\n```\nQ1 2026 TEAM FORECAST\n\nTEAM TOTAL: $1.2M quota | $910K forecast | 76%\n\nBY REP:\n| Rep      | Quota  | Won    | Commit | Fcst   | %   |\n|----------|--------|--------|--------|--------|-----|\n| Sarah J. | $400K  | $150K  | $180K  | $370K  | 93% |\n| Mike P.  | $400K  | $120K  | $140K  | $295K  | 74% ⚠️|\n| Lisa C.  | $400K  | $110K  | $100K  | $245K  | 61% ?|\n\nAT RISK: Lisa C. needs $155K more to hit quota\nCOVERAGE: Mike P. has only 2.1x pipeline (below 3x threshold)\n```\n\n### Example 3: Next Quarter Planning\n\n**User says:** \"What's the pipeline look like for Q2?\"\n\n**Actions:**\n1. Calculate Q2 date boundaries\n2. Query opportunities with Q2 close dates\n3. Analyze coverage and stage distribution\n4. Generate forward-looking view\n\n**Result:**\n```\nQ2 2026 PIPELINE PREVIEW\n\nOPEN PIPELINE: $850,000 (32 deals)\n\nBY CATEGORY:\nCommitted: $120K (early commits)\nBest Case: $280K\nPipeline: $450K\n\nSTAGE DISTRIBUTION:\n| Stage    | Count | Value  |\n|----------|-------|--------|\n| Qualify  | 12    | $180K  |\n| Develop  | 14    | $420K  |\n| Propose  | 6     | $250K  |\n\nCOVERAGE: 2.1x to Q2 quota ($400K)\n⚠️ ALERT: Need $350K more qualified pipeline by April 1\n```\n\n## Troubleshooting\n\n### Error: Quota data not available\n**Cause:** msdyn_forecastdefinition table not configured or empty\n**Solution:**\n- Ask user to provide quota amount manually\n- Display forecast totals without % to quota\n- Note that Sales Insights forecasting not enabled\n\n### Error: Forecast categories not populated\n**Cause:** Reps not setting msdyn_forecastcategory on opportunities\n**Solution:**\n- Fall back to probability-based categorization\n- >80% = Committed, 50-80% = Best Case, \u003C50% = Pipeline\n- Recommend enabling forecast category enforcement\n\n### Error: Stale pipeline data\n**Cause:** Many deals have old modifiedon dates\n**Solution:**\n- Flag deals not updated in 30+ days\n- Recommend pipeline hygiene review\n- Apply discount factor to stale deals in weighted calc","# Forecast\n\nSales forecasting requires aggregating pipeline data across reps, applying probability weighting, and identifying where the number is at risk or has upside. This skill automates that process from Dataverse opportunity records — producing a structured forecast with committed, best-case, and pipeline totals broken down by owner and by forecast category, with risk and upside annotations.\n\n## Instructions\n\n### Step 1: Define Forecast Parameters\nAccept input from the user:\n- **Period:** Current quarter (default), next quarter, current month, or custom date range\n- **Scope:** Individual rep, team\u002Fmanager rollup, or full organization\n- **Owner filter:** Specific systemuserid, team, or all\n- **Currency:** Use organization default\n\nCalculate period boundaries:\n- **Current quarter start\u002Fend** based on today's date and fiscal calendar\n- **Period start:** `[quarter_start]T00:00:00Z`\n- **Period end:** `[quarter_end]T23:59:59Z`\n\n#### Step 2: Fetch Open Opportunities in Period\n```\nSELECT opportunityid, name, estimatedvalue, estimatedclosedate, closeprobability,\n       salesstage, msdyn_forecastcategory, ownerid, customerid, accountid,\n       budgetstatus, decisionmaker, need, purchasetimeframe, purchaseprocess,\n       createdon, modifiedon, description\nFROM opportunity\nWHERE statecode = 0\nAND estimatedclosedate >= '[period_start]'\nAND estimatedclosedate \u003C= '[period_end]'\nORDER BY ownerid, estimatedvalue DESC\n```\n\nApply owner filter if specified.\n\n#### Step 3: Fetch Already-Closed Deals in Period\n**Won this period (actuals):**\n```\nSELECT opportunityid, name, estimatedvalue, actualclosedate, ownerid, customerid\nFROM opportunity\nWHERE statecode = 1\nAND actualclosedate >= '[period_start]'\nAND actualclosedate \u003C= '[period_end]'\nORDER BY ownerid, actualclosedate DESC\n```\n\n**Lost this period (for win rate context):**\n```\nSELECT COUNT(opportunityid) as lost_count, SUM(estimatedvalue) as lost_value, ownerid\nFROM opportunity\nWHERE statecode = 2\nAND actualclosedate >= '[period_start]'\nAND actualclosedate \u003C= '[period_end]'\nGROUP BY ownerid\n```\n\n#### Step 4: Segment by Forecast Category\nGroup open opportunities by `msdyn_forecastcategory`:\n\n**Forecast category values:**\n| Code | Label | Description |\n|------|-------|-------------|\n| 100000001 | Pipeline | Early stage, uncertain |\n| 100000002 | Best Case | Possible with favorable conditions |\n| 100000003 | Committed | Rep has high confidence in close |\n| 100000004 | Omitted | Excluded from forecast |\n| 100000005 | Won | Already closed won (use for actuals) |\n| 100000006 | Lost | Already closed lost |\n\nFor each category, calculate:\n- Count of opportunities\n- Total value (sum of estimatedvalue)\n- Weighted value (sum of estimatedvalue × closeprobability \u002F 100)\n\nRun separate queries per category:\n\n**Committed:**\n```\nSELECT COUNT(opportunityid) as count, SUM(estimatedvalue) as total,\n       ownerid\nFROM opportunity\nWHERE statecode = 0\nAND msdyn_forecastcategory = 100000003\nAND estimatedclosedate >= '[period_start]'\nAND estimatedclosedate \u003C= '[period_end]'\nGROUP BY ownerid\n```\n\nRepeat for Best Case (100000002) and Pipeline (100000001).\n\n#### Step 5: Calculate Weighted Forecast\nFor each opportunity, compute:\n- **Committed:** Use full estimatedvalue (rep has high confidence)\n- **Best Case:** estimatedvalue × closeprobability \u002F 100\n- **Pipeline:** estimatedvalue × closeprobability \u002F 100\n\n**Total forecast by rep:**\n- Forecast = Won (actuals) + Committed (full value) + Best Case (weighted)\n- Upside = Pipeline weighted value above Committed + Best Case\n- Gap to quota = Quota − Forecast (if quota data available)\n\n**Note:** Quota data may be stored in `msdyn_quotas` or `msdyn_forecastconfiguration` if Sales Insights forecasting is enabled. Query if available:\n```\nSELECT msdyn_forecastdefinitionid, msdyn_forecastdefinitionname, msdyn_quotasource\nFROM msdyn_forecastdefinition\nWHERE statecode = 0\n```\n\nIf quota is not in Dataverse, accept as a user-provided input.\n\n#### Step 6: Check Forecast Accuracy Signals\n\nFor each deal in Committed category, validate:\n\n**Red flags (may deflate number):**\n- No activity in last 7 days (check activitypointer)\n- Close date in current week but stage is Qualify or Develop\n- Budget not confirmed (budgetstatus = 0 or 1)\n- Decision maker not identified (decisionmaker = false\u002Fnull)\n- Close date has slipped before (compare createdon to estimatedclosedate gap)\n\n**Upside signals (may inflate number):**\n- Deal in Best Case with strong qualification (BANT score ≥ 8\u002F10)\n- Deal with recent positive activity (meeting or call in last 3 days)\n- Accelerated stage velocity (moved two stages in less than 2 weeks)\n\n#### Step 7: Calculate Activity Recency for Each Deal\nFor each Committed and Best Case opportunity:\n```\nSELECT TOP 1 activityid, activitytypecode, actualend, subject\nFROM activitypointer\nWHERE regardingobjectid = '[opportunityid]'\nAND statecode = 1\nORDER BY actualend DESC\n```\n\nFlag if last activity > 7 days ago for Committed deals.\n\n#### Step 8: Generate Forecast Report\n\n```\nSALES FORECAST REPORT\nPeriod: Q[n] [Year] ([Start Date] – [End Date])\nScope: [Rep Name \u002F Team \u002F Organization]\nGenerated: [Today's Date]\n═══════════════════════════════════════════════════════════\n\nPERIOD SUMMARY\n───────────────────────────────────────────────────────────\nQuota:            $[quota]\nWon (Actuals):    $[won_value]    ([n] deals)\nCommitted:        $[committed]    ([n] deals)\nBest Case:        $[best_case_w]  ([n] deals, weighted)\nPipeline:         $[pipeline_w]   ([n] deals, weighted)\n─────────────────────────────────────────────\nTotal Forecast:   $[won + committed + best_case_weighted]\nUpside Potential: $[pipeline_weighted]\nForecast vs Quota: [n]% | [Gap: $X above\u002Fbelow]\n\nFORECAST BY REP\n───────────────────────────────────────────────────────────\nRep Name          | Quota    | Won     | Commit  | Best    | Fcst    | vs Quota\n[Rep 1]           | $[quota] | $[won]  | $[com]  | $[bc]   | $[tot]  | [+\u002F-n]%\n[Rep 2]           | $[quota] | $[won]  | $[com]  | $[bc]   | $[tot]  | [+\u002F-n]%\n\nCOMMITTED DEALS ([n] deals, $[value])\n───────────────────────────────────────────────────────────\n? [Deal Name] — $[Value] | [Stage] | Close: [Date] | Rep: [Name]\n   Last activity: [n] days ago | BANT: [score]\u002F10\n\n⚠️  [Deal Name] — $[Value] | [Stage] | Close: [Date] | Rep: [Name]\n   ⚠️ No activity in 14 days | Budget not confirmed\n\nBEST CASE DEALS ([n] deals, $[weighted_value] weighted)\n───────────────────────────────────────────────────────────\n[Deal Name] — $[Value] ([prob]%) = $[weighted] | [Stage] | Close: [Date]\n...\n\nPIPELINE (Unweighted: $[value] | Weighted: $[weighted])\n───────────────────────────────────────────────────────────\n[n] deals in pipeline category for period\nTop 3 by value: [Deal 1], [Deal 2], [Deal 3]\n\nFORECAST RISKS\n───────────────────────────────────────────────────────────\n? [Deal Name] — $[Value] | Committed but no activity in [n] days\n? [Deal Name] — $[Value] | Close date today, stage = Qualify\n? [Deal Name] — $[Value] | Budget unconfirmed, in Committed\n\nUPSIDE OPPORTUNITIES\n───────────────────────────────────────────────────────────\n⬆️  [Deal Name] — $[Value] | Best Case, BANT 9\u002F10, meeting 2 days ago\n⬆️  [Deal Name] — $[Value] | Pipeline, strong qualification, close date pull-in possible\n\nRECOMMENDED ACTIONS\n───────────────────────────────────────────────────────────\n1. [Rep Name] — call [Deal Name] today; no activity in [n] days, closes this week\n2. Move [Deal Name] from Committed to Best Case — budget not confirmed\n3. Accelerate [Deal Name] — strong signals, could be a pull-in to this quarter\n═══════════════════════════════════════════════════════════\n```\n\n### Output Format\nDeliver a three-part output:\n1. **Executive summary** — one-line forecast vs quota\n2. **Tabular rep rollup** — every rep's committed \u002F best case \u002F forecast vs quota\n3. **Deal-level detail** — Committed and Best Case deals with health signals, risks, and upside\n\n### Example Interaction\n\n**User Input:**\n\"Generate the Q1 2026 forecast for the West team.\"\n\n**Skill Output:**\n```\nSALES FORECAST — Q1 2026 | West Team\n═══════════════════════════════════════════════════════════\nQuota: $1,200,000\nWon (Actuals): $380,000 (32% attainment)\nCommitted: $420,000 | Best Case: $180,000 (w) | Pipeline: $95,000 (w)\nTotal Forecast: $980,000 — 82% of quota\nGap to close: $220,000\n\nFORECAST BY REP\n─────────────────────────────────────────────────────\nSarah J.  | $400K quota | $150K won | $180K commit | Fcst: $370K | 93%\nMike P.   | $400K quota | $120K won | $140K commit | Fcst: $295K | 74% ⚠️\nLisa C.   | $400K quota | $110K won | $100K commit | Fcst: $245K | 61% ?\n\nRISKS\n? Northwind ($85K, Committed) — no activity 12 days, close date March 3\n? Fabrikam ($42K, Committed) — budget unconfirmed\n\nUPSIDE\n⬆️ Alpine Ski ($65K, Best Case) — BANT 9\u002F10, meeting yesterday\n```\n\n### Dataverse Tables Used\n| Table | Purpose |\n|-------|---------|\n| `opportunity` | Pipeline data, categories, and values |\n| `activitypointer` | Activity recency per deal |\n| `account` | Account name for display |\n| `systemuser` | Rep names and rollup |\n| `msdyn_forecastdefinition` | Quota data (if Sales Insights enabled) |\n\n### Key Fields Reference\n**opportunity:**\n- `estimatedvalue` (MONEY) - Deal value\n- `estimatedclosedate` (DATE) - Expected close\n- `closeprobability` (INT) - Win probability % (0-100)\n- `msdyn_forecastcategory` (CHOICE) - Pipeline(100000001), Best Case(100000002), Committed(100000003), Omitted(100000004), Won(100000005), Lost(100000006)\n- `salesstage` (CHOICE) - Qualify(0), Develop(1), Propose(2), Close(3)\n- `statecode` (STATE) - Open(0), Won(1), Lost(2)\n- `ownerid` (LOOKUP) - Assigned rep (systemuser)\n\n### Configurable Parameters\n- Forecast period (default: current quarter)\n- Committed weighting method (full value vs probability-weighted)\n- Activity recency alert threshold for Committed deals (default: 7 days)\n- Minimum deal size to include in report (default: $0)\n- Quota source (Dataverse table or user-provided input)\n- Coverage ratio warning threshold (default: below 3x pipeline to quota)\n\n## Examples\n\n### Example 1: Personal Forecast\n\n**User says:** \"What's my forecast for this quarter?\"\n\n**Actions:**\n1. Determine current quarter boundaries\n2. Query open opportunities for current user\n3. Segment by forecast category\n4. Calculate weighted totals\n5. Flag risks and upside\n\n**Result:**\n```\nQ1 2026 FORECAST - Sarah Johnson\n\nQUOTA: $400,000\n\nACTUALS (Won): $150,000 (38%)\nCOMMITTED: $180,000\nBEST CASE: $65,000\nPIPELINE: $120,000\n\nWEIGHTED FORECAST: $370,000 (93%)\nGAP TO QUOTA: $50,000\n\nRISKS:\n? Northwind ($85K) - no activity 12 days\n? Fabrikam ($42K) - budget unconfirmed\n\nUPSIDE:\n⬆️ Alpine Ski ($65K) - BANT 9\u002F10, strong momentum\n```\n\n### Example 2: Team Forecast Rollup\n\n**User says:** \"Show me the team forecast\"\n\n**Actions:**\n1. Query all reps reporting to current user (or team)\n2. Aggregate opportunities by owner\n3. Compare each rep to quota\n4. Generate team summary with risk indicators\n\n**Result:**\n```\nQ1 2026 TEAM FORECAST\n\nTEAM TOTAL: $1.2M quota | $910K forecast | 76%\n\nBY REP:\n| Rep      | Quota  | Won    | Commit | Fcst   | %   |\n|----------|--------|--------|--------|--------|-----|\n| Sarah J. | $400K  | $150K  | $180K  | $370K  | 93% |\n| Mike P.  | $400K  | $120K  | $140K  | $295K  | 74% ⚠️|\n| Lisa C.  | $400K  | $110K  | $100K  | $245K  | 61% ?|\n\nAT RISK: Lisa C. needs $155K more to hit quota\nCOVERAGE: Mike P. has only 2.1x pipeline (below 3x threshold)\n```\n\n### Example 3: Next Quarter Planning\n\n**User says:** \"What's the pipeline look like for Q2?\"\n\n**Actions:**\n1. Calculate Q2 date boundaries\n2. Query opportunities with Q2 close dates\n3. Analyze coverage and stage distribution\n4. Generate forward-looking view\n\n**Result:**\n```\nQ2 2026 PIPELINE PREVIEW\n\nOPEN PIPELINE: $850,000 (32 deals)\n\nBY CATEGORY:\nCommitted: $120K (early commits)\nBest Case: $280K\nPipeline: $450K\n\nSTAGE DISTRIBUTION:\n| Stage    | Count | Value  |\n|----------|-------|--------|\n| Qualify  | 12    | $180K  |\n| Develop  | 14    | $420K  |\n| Propose  | 6     | $250K  |\n\nCOVERAGE: 2.1x to Q2 quota ($400K)\n⚠️ ALERT: Need $350K more qualified pipeline by April 1\n```\n\n## Troubleshooting\n\n### Error: Quota data not available\n**Cause:** msdyn_forecastdefinition table not configured or empty\n**Solution:**\n- Ask user to provide quota amount manually\n- Display forecast totals without % to quota\n- Note that Sales Insights forecasting not enabled\n\n### Error: Forecast categories not populated\n**Cause:** Reps not setting msdyn_forecastcategory on opportunities\n**Solution:**\n- Fall back to probability-based categorization\n- >80% = Committed, 50-80% = Best Case, \u003C50% = Pipeline\n- Recommend enabling forecast category enforcement\n\n### Error: Stale pipeline data\n**Cause:** Many deals have old modifiedon dates\n**Solution:**\n- Flag deals not updated in 30+ days\n- Recommend pipeline hygiene review\n- Apply discount factor to stale deals in weighted calc",{"name":5,"metadata":38,"description":7},{"author":39,"version":40,"category":41},"Dataverse","1.0.0","sales-analytics","main","10016dd09acfa5f4dfce84de4e34ef294961faaf","skills\u002Fforecast",9,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fdataverse-business-skills","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-03-10 22:57:33",{"source":9,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add microsoft\u002Fdataverse-business-skills --skill forecast",{"tool":57,"command":58},"bunx","bunx skills add microsoft\u002Fdataverse-business-skills --skill forecast",{"tool":60,"command":61},"pnpm","pnpm dlx skills add microsoft\u002Fdataverse-business-skills --skill forecast","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fdataverse-business-skills\u002Fblob\u002Fmain\u002Fskills\u002Fforecast\u002FSKILL.md",true,[],[66,78,91,103,115,127],{"skillNo":67,"name":68,"nameZh":69,"description":70,"descriptionZh":71,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":72,"categories":73,"keywords":76,"publishedAt":33},"01M69A19ETGAKEDJSRGPZ6QGTZ","win-loss-pattern-analyzer","销售赢输单模式分析","Analyzes closed opportunities to identify patterns between won and lost deals. Compares sales cycles, activities, stakeholder engagement, and deal characteristics for actionable playbook insights. Use when user asks \"why are we losing deals\", \"win loss analysis\", \"what makes deals win\", \"analyze lost opportunities\", \"sales pattern analysis\", \"compare won vs lost deals\", or \"improve win rate\".","分析已结束的销售机会，识别赢单与输单之间的模式。比较销售周期、销售活动、利益相关方参与度及交易特征，得出可落地的行动手册（playbook）洞察。当用户询问“为什么我们丢了单”、“赢输分析”、“什么让交易胜出”、“分析丢失的机会”、“销售模式分析”、“比较赢单与输单”或“提高赢单率”时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fdataverse-business-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwin-loss-pattern-analyzer\u002FSKILL.md",[74,75],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[77,32,31],"win loss pattern analyzer",{"skillNo":79,"name":80,"nameZh":81,"description":82,"descriptionZh":83,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":84,"categories":85,"keywords":88,"publishedAt":33},"01M69A17A9PBCXTW6BX84RQPVD","pipeline-health-analyzer","销售管道健康分析","Reviews opportunities in the sales pipeline to identify stuck deals, missing next steps, weak qualification, and unbalanced stages. Use when user asks \"how is my pipeline looking\", \"analyze pipeline health\", \"which deals are stuck\", \"pipeline review\", \"find at-risk deals\", \"identify stalled opportunities\", or \"audit my open deals\".","审查销售管道中的商机，识别停滞的交易、缺失的下一步、薄弱的商机资格评估以及阶段分布失衡。当用户询问“我的销售管道情况如何”、“分析管道健康状况”、“哪些交易卡住了”、“管道审查”、“找出有风险的交易”、“识别停滞商机”或“审查我的未完成交易”时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fdataverse-business-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpipeline-health-analyzer\u002FSKILL.md",[86,87],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[89,32,31,90],"pipeline health analyzer","review",{"skillNo":92,"name":93,"nameZh":94,"description":95,"descriptionZh":96,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":97,"categories":98,"keywords":101,"publishedAt":33},"01M69A15PGJM0FQRNMWMHHVQTC","next-best-action-engine","商机下一步行动推荐","Analyzes an opportunity's current state and engagement history, compares against won deals, and recommends the most effective next action with reasoning. Use when user asks \"what should I do next on this deal\", \"next steps for this opportunity\", \"how do I move this deal forward\", \"what's the best action for this opp\", \"deal coaching\", or \"opportunity next action\".","分析商机的当前状态与互动历史，与已赢单进行比较，并给出理由推荐最有效的下一步行动。当用户询问“这笔交易接下来我该做什么”、“此商机的下一步”、“如何推进这笔交易”、“这个商机的最佳行动是什么”、“交易指导”或“商机下一步行动”时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fdataverse-business-skills\u002Fblob\u002Fmain\u002Fskills\u002Fnext-best-action-engine\u002FSKILL.md",[99,100],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[102,31],"next best action engine",{"skillNo":104,"name":105,"nameZh":106,"description":107,"descriptionZh":108,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":109,"categories":110,"keywords":113,"publishedAt":33},"01M69A13E5XFQH0FFSQV14N77Q","log-call-transcripts","销售通话记录录入 CRM","Analyzes sales call transcripts to extract key information and automatically logs the call as a Phone Call activity in Dataverse. Use when user says \"log this call\", \"process this transcript\", \"save this call to CRM\", \"create a phone call record from this transcript\", uploads a call recording transcript, or pastes meeting\u002Fcall notes to be logged.","分析销售通话记录以提取关键信息，并自动将该通话在 Dataverse 中记录为 Phone Call（电话）活动。当用户说“记录此通话”、“处理此记录”、“将此通话保存到 CRM”、“根据此记录创建电话记录”，或上传通话录音转写文本、粘贴待录入的会议\u002F通话记录时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fdataverse-business-skills\u002Fblob\u002Fmain\u002Fskills\u002Flog-call-transcripts\u002FSKILL.md",[111,112],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[114,31],"log call transcripts",{"skillNo":116,"name":117,"nameZh":118,"description":119,"descriptionZh":120,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":121,"categories":122,"keywords":125,"publishedAt":33},"01M69A123D52BE37H1PSJZCG5Y","lead-qualification-playbook","销售线索资格评估","Guides sales reps through structured lead qualification using BANT+ methodology. Evaluates leads, suggests discovery questions, scores quality, and recommends next steps. Use when user says \"qualify this lead\", \"help me qualify\", \"BANT analysis\", \"score this lead\", \"should I convert this lead\", \"lead qualification questions\", or \"assess lead quality\".","使用 BANT+ 方法指导销售代表进行结构化的销售线索资格评估。评估线索、建议需求探询问题、对质量进行评分并推荐后续步骤。当用户说“评估这条线索”“帮我评估”“BANT 分析”“给这条线索打分”“我应该转化这条线索吗”“销售线索资格问题”或“评估线索质量”时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fdataverse-business-skills\u002Fblob\u002Fmain\u002Fskills\u002Flead-qualification-playbook\u002FSKILL.md",[123,124],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[126,31],"lead qualification playbook",{"skillNo":128,"name":129,"nameZh":130,"description":131,"descriptionZh":132,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":133,"categories":134,"keywords":137,"publishedAt":33},"01M69A10JBPT5T3B7XN33XK3TX","handoff-brief-generator","销售交接简报生成","Creates comprehensive handoff documentation for sales reps going on vacation or transitioning deals. Generates structured briefs with deal status, activities, next steps, contacts, and risks. Use when user says \"I'm going on vacation\", \"create handoff brief\", \"coverage brief for my deals\", \"vacation handoff\", \"out of office brief\", \"transition my deals\", or \"backup documentation\".","为休假或移交交易的销售代表创建全面的交接文档。生成包含交易状态、活动记录、后续步骤、联系人和风险的结构化简报。当用户说“我要休假了”“创建交接简报”“我的交易代管简报”“休假交接”“外出办公简报”“移交我的交易”或“备份文档”时使用。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fdataverse-business-skills\u002Fblob\u002Fmain\u002Fskills\u002Fhandoff-brief-generator\u002FSKILL.md",[135,136],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[138,139,140,141,31],"handoff brief generator","handoff","documentation","status"]