create_commerce_policy
Create a commerce pricing policy: the rules the pipeline uses to draft price proposals, with an optional floor and ceiling and an approval mode. Starts active. Needs a Last Price credential with commerce configure scope, and a claimed workspace. Needs a claimed workspace: a sandbox key from self-registration is refused (403) until a person claims the workspace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A name for the policy. | |
| rules | Yes | The rules, tried in order; the first that produces a price wins. Each rule has an id, a kind and the fields its kind needs: a percent to undercut by, an amount to beat the lowest price by, a percent off the list price, a competitor to match, a fixed price, or a routing choice. The Pricing Policies section of the documentation lists them. | |
| scope | No | Which items the policy covers: skus, brands and marketplaces lists. Empty covers every item. | |
| is_active | No | Whether the pipeline applies the policy. | |
| description | No | What the policy is for. | |
| floor_price | No | No proposal goes below this price. | |
| approval_mode | No | manual queues every proposal for a decision, auto approves small changes, shadow records proposals without acting on them. | |
| ceiling_price | No | No proposal goes above this price. | |
| auto_approve_max_delta_pct | No | With approval_mode auto: proposals that move the price by at most this percent skip the queue. Required for auto. |