Pricing Analysis
pricing_analyzeAnalyze pricing across products using margin calculation and sales velocity to generate price optimization suggestions. Returns per-product data including current price, cost, margin, daily units sold, revenue, and suggested price.
Instructions
Analyze pricing across products with margin calculation, sales velocity, and rule-based price optimization suggestions. Returns an array where each element contains product_title, current_price, cost, margin_percent, daily_units_sold, revenue_per_day, suggested_price (or null if no change recommended), and suggestion_reason. Pass product_id to scope to a single product, omit for full catalog.
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) | |
| product_id | No | Restrict the analysis to a single product by external_id. Omit to analyse the entire active catalog. |
Implementation Reference
- src/models/store.ts:149-163 (schema)Zod schema and TypeScript type 'PricingAnalysis' defining the return shape: product_id, product_title, current_price, cost_price, margin_percent, avg_units_per_day, revenue_per_day, suggested_price, suggestion_reason, etc.
export const PricingAnalysisSchema = z.object({ product_id: z.string(), product_title: z.string(), current_price: z.number(), cost_price: z.number().nullable(), margin_percent: z.number().nullable(), compare_at_price: z.number().nullable(), discount_percent: z.number().nullable(), avg_units_per_day: z.number(), revenue_per_day: z.number(), price_elasticity_hint: z.string(), suggested_price: z.number().nullable(), suggestion_reason: z.string(), }); export type PricingAnalysis = z.infer<typeof PricingAnalysisSchema>;