get_velocity
Get sales-velocity analytics from one of two angles — pass angle to pick which, report to pick the report within it.
• angle:"inventory" — the INVENTORY-management angle: how fast stock is moving and what to reorder. Reports: summary (sell-through rate, turnover, health status), by_product (products sorted by sales velocity), restock (reorder quantity recommendations from velocity, lead time, and safety stock — pass leadTimeDays/safetyStockDays; the reason to pick this angle). Use when the question is "what should I reorder and how much?". • angle:"product" — the PRODUCT angle: how individual products are selling over time. Reports: summary (totalUnitsSold, revenue, productsTracked, inventoryHealth counts), by_product (per-product velocity, stock, reorder urgency), trend (daily time series for one product — requires productId), stagnant (active products with zero or near-zero sales — dead stock/zombie listings; pass maxOrders to widen from zero-sales to near-zero). Use for a single product's trend or stagnant/dead-stock questions.
Both angles share report:"summary"/"by_product" (different content per angle) and the sortBy/filter params on by_product. days defaults to 30 in both angles (note: angle:"product", report:"summary" ignores days entirely — it's always a fixed trailing-30-day aggregate).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Days for velocity calculation (default: 30 in both angles). Ignored by angle:"product", report:"summary" — that report is always a fixed trailing-30-day aggregate. | |
| angle | Yes | Which velocity angle to query. See the tool description for the report list and defaults per angle. | |
| limit | No | For by_product: number of products (default: 20). | |
| filter | No | For by_product: filter. | |
| report | Yes | Report type — valid values depend on `angle` (see tool description): inventory has summary/by_product/restock; product has summary/by_product/trend/stagnant. | |
| sortBy | No | For by_product: sort field. | |
| _offset | No | Pagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page. | |
| maxOrders | No | For angle:"product", report:"stagnant": max orders to count as stagnant (default: 0 = zero sales only, use 1-2 for near-zero). | |
| productId | No | For angle:"product", report:"trend": Shopify product ID (required). | |
| variantId | No | For angle:"product", report:"trend": Shopify variant ID (optional). | |
| leadTimeDays | No | For angle:"inventory", report:"restock": lead time in days (default: 14). | |
| safetyStockDays | No | For angle:"inventory", report:"restock": safety buffer days (default: 7). |