bling.fetch-user
Fetch the OAuth-authenticated Bling user identity via LTIP commerce_user and persist it as a commerce_entity row (entity_type='user'). Singleton — no pagination.
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 | — | — |
actor | string | No | — | — |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
connection_uuid | uuid | Yes | — | — |
actor | string | No | — | — |
user | json | No | — | — |
commerce_entity_uuid | uuid | No | — | — |
persisted_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 | — | fetch_and_persist | Fetch + persist user |
completed | No | Yes | Yes | — | User persisted |
failed | No | Yes | No | — | Fetch or persist failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
initiated | fetch_and_persist | completed | — |
initiated | fail | failed | — |
Business Errors
| Code | Message Template |
|---|---|
BLING_CONNECTION_NOT_FOUND | Bling connection {connection_uuid} not found in organization |
BLING_CONNECTION_WRONG_PROVIDER | Connection {connection_uuid} is not a Bling connection |
BLING_USER_PERSIST_FAILED | data.commerce.entity.persist failed for user: |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "bling.fetch-user",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value"
}
}