ifood.sync-sales ​
Fetch one Sales page, persist sale entities, and upsert a sync checkpoint
Persist one Sales page into commerce with a sync checkpoint.
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 | — | — |
force | boolean | No | — | — |
page_size | integer | 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 | — | — |
force | boolean | No | — | — |
page_size | integer | No | — | — |
fetch_sales | json | No | — | — |
persist_sales | 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-sales | — |
| 2 | persist | data.commerce.entity.persist-batch | — |
| 3 | checkpoint | data.commerce.sync-checkpoint.upsert | — |
Execution Flow ​
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
ifood.fetch-sales | fetch_sales |
data.commerce.entity.persist-batch | persist_sales |
data.commerce.sync-checkpoint.upsert | upsert_checkpoint |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "ifood.sync-sales",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value",
"merchant_ref": "value",
"start_date": "value"
}
}