company_product_margin
Build a per-SKU product margin report from orders, stock, settlements, and catalog. Shows revenue, costs, fees, contribution, break-even units, and revenue-to-contribution waterfall for any window.
Instructions
Build the sealed product margin report: per-SKU units, discounts, returns, net revenue, landed cost of goods, fees at the settlement batches' observed rate, fulfilment and return handling, contribution, break-even units, and the revenue-to-contribution waterfall from the persisted orders, stock positions, settlement batches, and published catalog (payload: optional window_start, window_end; the window defaults to the thirty days to now).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| now | No | ||
| engine | No | ||
| operation | No | build | |
| entity_ref | No | ||
| project_id | Yes | ||
| bundle_json | Yes | ||
| payload_json | No | {} |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |