Skip to main content

sales-analysis

Turn the RAW weekly sales rows and catalog facts from the Sales & Performance MCP into merchandising analytics by running the bundled sales_analysis.py script. Use first in an end-of-quarter markdown review, when a manager wants top sellers and slow-moving / dead stock over a period. The MCP returns raw data only, so the script derives velocity, weeks-of-cover, and margin, then prints the top sellers and slow movers as structured JSON. It renders NO charts (the merch-report-html skill owns all visuals) and does NOT decide discounts (hand the slow movers to markdown-optimizer).

소스 정보

저장소
microsoft/new-copilot-studio-tech-guide
최근 소스 활동
2026년 6월 21일 13:48
감지된 SKILL.md 언어
영어
스타
20
포크
18

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
sales-analysis
description
Turn the RAW weekly sales rows and catalog facts from the Sales & Performance MCP into merchandising analytics by running the bundled sales_analysis.py script. Use first in an end-of-quarter markdown review, when a manager wants top sellers and slow-moving / dead stock over a period. The MCP returns raw data only, so the script derives velocity, weeks-of-cover, and margin, then prints the top sellers and slow movers as structured JSON. It renders NO charts (the merch-report-html skill owns all visuals) and does NOT decide discounts (hand the slow movers to markdown-optimizer).
# Sales Analysis (data, not charts) This skill converts **raw** sales data into the analytics a markdown review needs by **running the bundled `sales_analysis.py` script**. The **Sales & Performance MCP** deliberately exposes only raw primitives (`query_sales`, `get_catalog`) - there is no `get_slow_movers` or `get_velocity` - so the script derives the metrics itself. It renders **no charts** on purpose: the interactive **merch-report-html** skill owns all the visuals at the end, which keeps the review fast. This skill just computes the numbers and prints the structured hand-offs. ## When to use **First** in an end-of-quarter markdown review, whenever a manager wants to see top sellers and slow / dead stock over a window. ## Inputs (fetch from the Sales & Performance Agent, then pass as flags) 1. **Raw weekly rows** - `query_sales(start_week, end_week)` for the window (default the full 8 weeks `2026-04-12` ... `2026-05-31`). Each row is `{sku, name, category, week, units, revenue}`. 2. **Catalog facts** - `get_catalog()` -> `{sku, name, price, unit_cost, stock_on_hand}`. ## Run the bundled script ```bash python3 sales_analysis.py \ --woc-threshold 8 \ --rows '[{"sku":"SKU-VR-GOGGLES","name":"OmegaVision VR Headset","category":"accessory","week":"2026-04-12","units":1,"revenue":199.99}]' \ --catalog '[{"sku":"SKU-VR-GOGGLES","name":"OmegaVision VR Headset","price":199.99,"unit_cost":70.00,"stock_on_hand":48}]' ``` It prints a compact summary, then two structured lines: - `TOP_SELLERS_JSON=[{name, units, velocity, revenue}]` - `SLOW_MOVERS_JSON=[{sku, name, price, cost, weeks_of_cover, margin, units}]` ## Metrics it derives (for your report, not for you to recompute) Over a window of `W` weeks, per SKU: `velocity = units_total / W`, `weeks_of_cover = stock_on_hand / velocity`, `margin% = (price - cost) / price * 100`. **Slow movers** = weeks-of-cover above the threshold (default 8), sorted descending. **Top sellers** = highest units. ## Next steps - Pass `SLOW_MOVERS_JSON` (it already carries `sku, name, price, cost`) to the **markdown-optimizer** skill, together with the guardrails from the Store Policy Agent. - Keep `TOP_SELLERS_JSON` and `SLOW_MOVERS_JSON` so the **merch-report-html** skill can render them into the final interactive report. - Do **not** recommend discounts here - that needs the Store Policy Agent's guardrails. ## Notes - The bundled script is `sales_analysis.py`; it uses only the Python standard library (no matplotlib, no network). - Never invent numbers - every value derives from the MCP results you fetched. All data is mock; for demo purposes only.
GitHub에서 보기