ifood.events.sweep ​
Run an order-event consume cycle for every active iFood connection
Fan the consume cycle out over active iFood connections.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-ifood |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | Restrict the sweep to one organization. Filled from the authenticated context when the caller is organization-scoped; a platform caller may omit it to sweep every tenant. |
limit | integer | No | — | Max connections this sweep (default 25) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | Restrict the sweep to one organization. Filled from the authenticated context when the caller is organization-scoped; a platform caller may omit it to sweep every tenant. |
limit | integer | No | — | Max connections this sweep (default 25) |
connections_seen | integer | Yes | — | — |
cycles_started | list | Yes | — | One {organization_uuid, connection_uuid, workflow_id} per started cycle |
failures | list | Yes | — | Connections whose cycle could not be started, with the reason |
swept_at | string | Yes | — | — |
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 | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | execute | — |
executing | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | execute | executing | — |
executing | complete | completed | — |
* (any state) | fail | failed | — |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
swept | SUCCESS | A consume cycle was started per active connection | connections_seen, cycles_started, failures |
failed | FAILURE | The sweep itself could not run | failure_reason, failure_type |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "ifood.events.sweep",
"initial_data": {
"organization_uuid": "value",
"limit": 123
}
}