Push External Sales Orders
push_external_sales_ordersPush sales orders fulfilled OUTSIDE Spark for an External warehouse. They feed demand velocity without touching on-hand (the snapshot stays the inventory authority). Idempotent: each order is keyed by its stable externalOrderId — re-pushing the same id is a no-op.
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": {
"warehouseId": "<warehouseId>",
"orders": "<orders>"
},
"name": "push_external_sales_orders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orders | Yes | Orders: externalOrderId (stable dedup key), customer fields, lines (identifier/quantity/price). | |
| preview | No | Step 1 of the required two-step write: set true to validate and receive a structured resolution preview (matched/unmatched identifiers, already-pushed order ids) plus a single-use previewReceipt. Nothing is written until the commit call. | |
| warehouseId | Yes | The External warehouse id (GUID). | |
| 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 | ||
| data | No | ||
| preview | No | ||
| expiresAt | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No |