Operation Execution
Execution Flow
pending
running
completed
- pending — Operation created, awaiting execution
- running — Operation is processing items
- completed — All items processed successfully
- partially_failed — Some items failed, others succeeded
- failed — Operation failed entirely
Processing
Operations process items in batches:
- Items are processed sequentially within a batch
- Progress is tracked in real-time
- Each item’s result (success/failure) is recorded
- Failed items include error details
Monitoring Progress
Portal
The operation detail page shows:
- Progress bar with processed/total count
- Real-time status updates
- List of failed items with error details
API
GET /api/operations/:idReturns:
{
"data": {
"id": "uuid",
"name": "Tag high-value orders",
"status": "running",
"targetType": "orders",
"action": { "type": "add_tag", "value": "priority" },
"progress": {
"total": 42,
"processed": 28,
"succeeded": 27,
"failed": 1
}
}
}Error Handling
When an item fails:
- The error is logged with details
- Processing continues with the next item
- The operation status becomes
partially_failedif some items fail - You can retry failed items individually
Cancelling
Running operations can be cancelled:
POST /api/operations/:id/cancelItems already processed will retain their changes. Remaining items will not be processed.