Analyze Sales Metrics
analyze_sales_metricsCalculate gross revenue, average order value, top-selling products, and fulfillment status breakdown from order history; filter by product category.
Instructions
Calculates gross revenue, average order value (AOV), the top-selling products by units sold, and a breakdown of orders by fulfillment status (pending / shipped / delivered), based on current order history. Figures cover all recorded orders; the 'period' field reports the actual date span so a stale dataset is visible. An optional category scopes every figure to products in that category: revenue, units and the trend count only lines of those products, an order counts toward the breakdown and AOV when it contains at least one such line, and the echoed 'filters' block reports the category actually applied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Restrict to a single category, e.g. 'tech', 'apparel', or 'home'. Case-insensitive. Omit to cover the whole catalog. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trend | Yes | ||
| period | Yes | ||
| filters | Yes | ||
| orderCount | Yes | ||
| grossRevenue | Yes | ||
| averageOrderValue | Yes | ||
| topSellingProducts | Yes | ||
| orderFulfillmentBreakdown | Yes |