Set Replenishment Defaults
set_replenishment_defaultsChange the tenant's replenishment defaults (see get_replenishment_defaults): the default purchase lead time (days) and flat safety stock (days of demand) for items nothing more specific covers, tenant-wide and per item group. A group's default wins over the tenant's. Lead times or buffers typed on an item-warehouse, supplier defaults and purchase-order history keep taking precedence. Only the values you pass change; set clearLeadTimeDays / clearSafetyStockDays to inherit again. The preview shows each value before→after and how many items fall back to it. Requires an operator (unpinned) credential with Write + planning.execute and the Admin role.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "set_replenishment_defaults"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tenant | No | Tenant-wide defaults to change; omit to leave them alone. | |
| preview | No | Step 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call. | |
| itemGroups | No | Item groups whose defaults to change; groups not listed are left alone. | |
| 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 | ||
| preview | No | ||
| defaults | No | ||
| expiresAt | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No |