ifood.sync-financial-events ​
Fetch one Financial Events page, persist entities, and upsert a checkpoint
Persist one Financial Events page into commerce.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-ifood |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Authenticated organization UUID injected by the workflow boundary |
connection_uuid | uuid | Yes | — | Organization-scoped iFood CloudConnection UUID |
workflow_run_id | string | No | — | Engine-stamped parent DAG run id |
data_environment | string | No | production | Which iFood data set to read: 'production' (default) or 'homologation' for official iFood test records. Homologation maps to a provider-owned request header; callers never supply HTTP headers. Persisted evidence must be partitioned by this value so test and production records can never be reconciled together. |
merchant_ref | string | Yes | — | — |
start_date | string | Yes | — | — |
end_date | string | Yes | — | — |
window_key | string | No | — | — |
page | integer | No | — | — |
page_size | integer | No | — | — |
force | boolean | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Authenticated organization UUID injected by the workflow boundary |
connection_uuid | uuid | Yes | — | Organization-scoped iFood CloudConnection UUID |
workflow_run_id | string | No | — | Engine-stamped parent DAG run id |
data_environment | string | No | production | Which iFood data set to read: 'production' (default) or 'homologation' for official iFood test records. Homologation maps to a provider-owned request header; callers never supply HTTP headers. Persisted evidence must be partitioned by this value so test and production records can never be reconciled together. |
merchant_ref | string | Yes | — | — |
start_date | string | Yes | — | — |
end_date | string | Yes | — | — |
window_key | string | No | — | — |
page | integer | No | — | — |
page_size | integer | No | — | — |
force | boolean | No | — | — |
fetch_events | json | No | — | — |
persist_events | json | No | — | — |
upsert_checkpoint | json | No | — | — |
processed_count | integer | No | — | — |
persisted_count | integer | No | — | — |
window_count | integer | No | — | — |
last_page | integer | No | — | — |
checkpoint_uuid | uuid | No | — | — |
completed_at | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | integer | No | — | — |
failed_at_state | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
failed_at | string | No | — | — |
provider_request_ref | string | No | — | — |
retryable | boolean | No | — | — |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | fetch | ifood.fetch-financial-events | — |
| 2 | persist | data.commerce.entity.persist-batch | — |
| 3 | checkpoint | data.commerce.sync-checkpoint.upsert | — |
Execution Flow ​
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
ifood.fetch-financial-events | fetch_events |
data.commerce.entity.persist-batch | persist_events |
data.commerce.sync-checkpoint.upsert | upsert_checkpoint |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "ifood.sync-financial-events",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value",
"merchant_ref": "value",
"start_date": "value"
}
}