bling.sync-journal-entries ​
Iterate every page of Bling lançamentos for a single bill and persist each into commerce_entity (entity_type='journal_entry').
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-bling |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
connection_uuid | uuid | Yes | — | — |
linked_receivable_external_ref | string | No | — | — |
linked_payable_external_ref | string | No | — | — |
limite | integer | No | — | — |
actor | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
connection_uuid | uuid | Yes | — | — |
linked_receivable_external_ref | string | No | — | — |
linked_payable_external_ref | string | No | — | — |
limite | integer | No | — | — |
actor | string | No | — | — |
current_page | integer | No | — | — |
synced_count | integer | No | — | — |
persisted_count | integer | No | — | — |
created_count | integer | No | — | — |
updated_count | integer | No | — | — |
last_page_items | json | No | — | — |
has_next_page | boolean | 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 | — | start | Sync requested |
fetching | No | No | — | — | Fetching one page |
planning | No | No | — | fetch_page | Kick first page fetch |
completed | No | Yes | Yes | — | All pages synced |
failed | No | Yes | No | — | Sync failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | start | planning | — |
planning | fetch_page | fetching | — |
fetching | fetch_page | fetching | — |
fetching | complete | completed | — |
initiated | fail | failed | — |
planning | fail | failed | — |
fetching | fail | failed | — |
Business Errors ​
| Code | Message Template |
|---|---|
BLING_PAGE_FETCH_FAILED | bling.fetch-journal-entry failed on page {page}: |
BLING_JOURNAL_ENTRY_NO_BILL_LINK | bling.sync-journal-entries requires linked_receivable_external_ref OR linked_payable_external_ref. |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "bling.sync-journal-entries",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value"
}
}