Roll Back Import Session
rollback_import_sessionRoll back a committed import — staged or inline (governed two-step, destructive): for sales-order imports, soft-deletes every order the session created and removes their seeded demand records so velocity/forecasting return to the pre-import state; for purchase-order imports, soft-deletes the POs; for customer-return imports (staged or import_customer_returns), soft-deletes the return orders so demand stops netting them. Catalog entities the import created (items, customers, UOMs, suppliers) are NOT removed — they may be referenced elsewhere; say so when reporting. Call with preview=true first, then repeat with the previewReceipt and a fresh idempotencyKey.
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": {
"importSessionId": "<importSessionId>"
},
"name": "rollback_import_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preview | No | Set true for the dry-run preview. | |
| idempotencyKey | No | Caller-generated idempotency key; required with previewReceipt. | |
| previewReceipt | No | The receipt returned by the preview call. | |
| importSessionId | Yes | The import session id (GUID). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| note | No | ||
| expiresAt | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| ordersDeleted | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| ordersToDelete | No | ||
| previewReceipt | No | ||
| idempotentReplay | No |