Set Inventory Policy
set_inventory_policySet or update the reorder policy for items at a warehouse: reorder point (the low-stock threshold), and optionally restock quantity, safety-stock days, and lead-time days. A reorder point or restock quantity you set is pinned (it won't auto-recalculate from velocity), so setting a reorder point ABOVE current available intentionally stages a low-stock situation. A line with only lead-time or safety-stock days keeps a calculated policy calculated, recomputed with the new inputs (preview shows its new reorder point and quantity as null). Each line is matched by SKU then UPC; unmatched identifiers are reported, not fatal. A line may name its own warehouseId, so one call can edit policies at several warehouses (read them first with get_replenishment_settings). A line's pinned=true freezes its reorder point and quantity; pinned=false returns them to the calculation. Omit warehouseId when the tenant has exactly one Internal warehouse or every line names one. Max 500 lines per call.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"policies": "<policies>"
},
"name": "set_inventory_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preview | No | Step 1 of the required two-step write: set true to validate and receive a structured old→new preview plus a single-use previewReceipt. Nothing is changed until the commit call. | |
| clientId | No | Optional client id (GUID) for operator (unpinned) credentials on 3PL tenants: confines SKU/UPC matching to that client's items — get ids from list_clients. Client-pinned credentials omit this; the credential decides. | |
| policies | Yes | Reorder policies to set/update (max 500 per call). | |
| warehouseId | No | Optional warehouse id (GUID). May be omitted when the tenant has exactly one Internal warehouse; an explicit id may target any of the tenant's warehouses. | |
| idempotencyKey | No | Caller-generated idempotency key; required with previewReceipt to commit. | |
| previewReceipt | No | Step 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| errors | No | ||
| failed | No | ||
| applied | No | ||
| preview | No | ||
| skipped | No | ||
| policies | No | ||
| expiresAt | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No | ||
| skippedIdentifiers | No |