Skip to Content
OperationsExecution

Operation Execution

Execution Flow

pending
running
completed
  1. pending — Operation created, awaiting execution
  2. running — Operation is processing items
  3. completed — All items processed successfully
  4. partially_failed — Some items failed, others succeeded
  5. 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/:id

Returns:

{ "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_failed if some items fail
  • You can retry failed items individually

Cancelling

Running operations can be cancelled:

POST /api/operations/:id/cancel

Items already processed will retain their changes. Remaining items will not be processed.