company_returns_ledger
Builds a per-SKU returns ledger, calculating return rates, refunds, handling costs, restock value, and write-downs to identify SKUs above threshold, unsaleable returns, and restocking gaps.
Instructions
Build the sealed returns ledger for the window: per SKU the units sold and returned from the persisted orders, the return rate, the returned orders and their conditions, the refund value at the window's margin report price (built now from the persisted commerce chains), the handling cost, the units the persisted stock positions actually restocked from those returns and the value put back, the write-downs in the window, and the net cost of returns as a share of net revenue; recommendations name SKUs returning above the threshold, returns coming back unsaleable, and resaleable units not yet restocked (payload: optional window_start, window_end).
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 |