Computes gross margin dollars and margin percent per SKU from a product sales export, rolled up by category with totals and overall margin. For e-commerce operators building a weekly merchandising and pricing view.
Parity builds Product Margin Register — a register with columns like Threshold applied, Report scope, Margin lines, By category, Total revenue usd, plus computed totals.
| Output | Type | |
|---|---|---|
| Threshold applied | string | — one of: Yes, No |
| Report scope | string | — one of: Filtered by minimum, All products |
| Margin lines | array | |
| By category | object | |
| Total revenue usd | numeric | |
| Total cogs usd | numeric | |
| Total gross margin usd | numeric | |
| Overall margin pct | numeric |
| Input | Type | |
|---|---|---|
| Min revenue usd | numeric · required | |
| Period label | string · required | |
| Product lines | array · required |
Compiled, deterministic, and auditable — the logic is confirmed once by a human, then runs byte-identically every time. No spreadsheets, no code.