Product Performance (ABC Analysis)
product_performanceClassify products by revenue using ABC analysis (top 80%, next 15%, bottom 5%) and review trends, margins, and daily sales velocity.
Instructions
Product performance report with ABC analysis. Category A = top 80% revenue, B = next 15%, C = bottom 5%. Includes trends, margins, and daily sales velocity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store_id | Yes | UUID of a connected store (returned by store_connect with action="connect" or visible in store_connect with action="list" / the store_overview resource) | |
| period_days | No | Look-back window for ABC classification, 7–90 days. Defaults to 30. Shorter windows favour recent trends; longer windows smooth seasonality. |
Implementation Reference
- src/models/store.ts:188-202 (schema)`ProductPerformanceSchema` — Zod schema defining the shape of each product performance record (product_id, product_title, sku, units_sold, revenue, cost, profit, margin_percent, abc_category, revenue_share_percent, avg_daily_units, trend). Also exports the `ProductPerformance` type.
export const ProductPerformanceSchema = z.object({ product_id: z.string(), product_title: z.string(), sku: z.string().nullable(), units_sold: z.number().int(), revenue: z.number(), cost: z.number().nullable(), profit: z.number().nullable(), margin_percent: z.number().nullable(), abc_category: ABCCategorySchema, revenue_share_percent: z.number(), avg_daily_units: z.number(), trend: z.enum(['rising', 'stable', 'declining']), }); export type ProductPerformance = z.infer<typeof ProductPerformanceSchema>;