bling.initial-sync
Runs the per-entity Bling sync workflows in dependency order — first the catalog support (categories, warehouses, contacts), then products, then stock, then sales documents.
Orchestrate every per-entity sync in dependency order.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-bling |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
connection_uuid | uuid | Yes | — | — |
since | string | No | — | ISO date — limits each per-entity sync to changes after this date |
actor | string | No | — | — |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
connection_uuid | uuid | Yes | — | — |
since | string | No | — | ISO date — limits each per-entity sync to changes after this date |
actor | string | No | — | — |
layer_results | json | No | — | { layer_index: { workflow_type: { workflow_uuid, synced_count, status } } } |
total_synced | integer | No | — | — |
started_at | string | No | — | — |
completed_at | string | No | — | — |
failure_reason | string | No | — | — |
failed_at | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | json | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | run_layers | Initial sync requested |
completed | No | Yes | Yes | — | All layers complete |
failed | No | Yes | No | — | Initial sync failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
initiated | run_layers | completed | — |
initiated | fail | failed | — |
Business Errors
| Code | Message Template |
|---|---|
BLING_LAYER_SYNC_FAILED | Layer {layer} failed at {workflow_type}: |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "bling.initial-sync",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value"
}
}