Merge Items
merge_itemsMerge a duplicate item into the item to keep (each by id or SKU), as the Merge items page does. The merged item's stock moves onto the kept item in each warehouse, its sales order and purchase order lines, reservations and Amazon/Shopify links are repointed, and it is deleted. The kept item keeps its own name, description, cost, price and UPCs unless takeFromMerged names fields to copy from the merged item. The preview shows both items side by side, stock per warehouse before and after, and what moves. A merge cannot be undone. Requires an operator (unpinned) credential and an Admin; both items must belong to the same client.
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": {
"keepItem": "<keepItem>",
"mergeItem": "<mergeItem>"
},
"name": "merge_items"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| keepItem | Yes | The item to keep (id or SKU). | |
| mergeItem | Yes | The duplicate item to merge into it and delete (id or SKU). | |
| 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. | |
| takeFromMerged | No | Fields the kept item takes from the merged item: any of name, description, cost, price, upcs. Omit to keep all of the kept item's own values. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| auditId | No | ||
| preview | No | ||
| expiresAt | No | ||
| keptItemId | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No | ||
| channelLinksRepointed | No | ||
| salesOrderLinesRepointed | No | ||
| purchaseOrderLinesRepointed | No |