Product Viability Score
run_product_viabilityRun a product viability simulation: given a proposed selling price, COGS, and expected ad spend, compute break-even ROAS, contribution margin, and sensitivity analysis against store averages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cogs | Yes | Proposed cost of goods sold per unit, in the tenant's currency. | |
| price | Yes | Proposed selling price per unit, in the tenant's currency; must be greater than 0. | |
| shipping_cost | No | Shipping cost per unit not already covered by COGS, in the tenant's currency (default 0). | |
| expected_volume_per_month | No | Expected units sold per month; when provided, the response includes a monthly_projection of contribution and ad spend (omitted otherwise). | |
| expected_ad_spend_per_unit | Yes | Expected ad spend required to sell one unit, in the tenant's currency (this is what break_even_roas is measured against). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | No | ||
| inputs | No | ||
| verdict | No | red when contribution is not positive, amber below 30% margin, green at or above it. | |
| _message | No | ||
| _truncated | No | ||
| verdict_reason | No | ||
| _tenant_context | No | ||
| break_even_roas | No | Null when the margin leaves no room to break even at any ROAS. | |
| store_benchmark | No | Store averages to compare against, or null when the benchmark service was unavailable. The simulation itself is still valid without it. | |
| monthly_projection | No | Null unless expected_volume_per_month was supplied. | |
| contribution_margin | No | Per unit: price minus COGS, ad spend per unit and shipping. | |
| contribution_margin_pct | No | ||
| sensitivity_contribution | No | Per-unit contribution margin under each single-variable shock. |