Problem Statement
The workflow analyzes weekly sales data to surface meaningful trends, anomalies, and performance insights for a sales analytics team. It identifies significant week-over-week and quarter-over-quarter changes, highlights rep-level outliers, and produces concise, actionable recommendations. The final output includes a short executive summary suitable for leadership review.
Steps
Load and Validate Sales Data
INGESTIngest the weekly sales CSV and verify required fields such as revenue, deals closed, pipeline value, rep performance, and comparison data. Check for missing values, inconsistent timestamps, and formatting issues.
Retrieve Historical Benchmarks
EXECUTEPull or calculate comparison metrics for the previous week and the same week last quarter. Ensure data alignment so comparisons reflect the correct periods.
Analyze Changes and Identify Patterns
EXECUTECompute percentage changes across key metrics and determine which exceed the 10 percent threshold. Flag statistically significant shifts and detect anomalies such as unexpected spikes or drops.
Detect Rep Outliers
EXECUTECalculate rep performance distributions and identify individuals in the top and bottom 10 percent. Validate outliers to avoid false positives due to small sample sizes.
Generate Insights and Summary
EXECUTEDraft the top three trends, anomaly flags, recommended actions, and a concise executive summary in an analytical and actionable tone.
Prompt Configurations
Sales Insights Generation Prompt
You are an analytical sales insights assistant. Using the structured metrics, computed percent changes, detected anomalies, and rep outlier lists provided, generate the following outputs: 1. Top 3 trends (only include changes greater than 10 percent). Clearly label whether each trend is an increase or decrease. 2. Anomaly flags with a brief explanation. 3. Recommended actions for each identified trend. Focus on actionable, data-grounded steps. 4. A 3-sentence executive summary written in an analytical, concise, and leadership-ready tone. Constraints: - Do not invent data; use only the metrics provided. - Do not imply causation; you may state correlations or notable patterns only. - Highlight statistical significance only when explicitly indicated in the data. Tone should be analytical, actionable, and concise.
Example Inputs/Outputs
Weekly CSV uploaded with revenue up 15% WoW, deals closed down 12%, pipeline value up 5%, rep performance showing two low performers in bottom 10 percent and one standout rep in top 10 percent. Previous quarter week shows revenue up 8% QoQ.
Top Trends: (1) Revenue increased 15% WoW and 8% QoQ; (2) Deals closed decreased 12% WoW; (3) Pipeline value showed no significant movements over 10%. Anomaly Flags: Deal count drop is statistically significant relative to norms. Recommended Actions: Investigate process bottlenecks affecting deal closures; double down on strategies used by top-performing reps; review pipeline composition quality. Executive Summary: Weekly revenue showed a strong uplift while deal counts declined meaningfully. Rep performance highlights both high-impact contributors and struggling individuals. Overall sales health is improving but requires focused action on conversion efficiency.