--- title: "Flow control" slug: "flow-control" description: "The user manual provides comprehensive guidance on using the Antavo Management UI for managing loyalty programs." updated: 2026-11-18T11:56:52Z published: 2026-11-18T11:56:52Z canonical: "docs.antavo.com/flow-control" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.antavo.com/llms.txt > Use this file to discover all available pages before exploring further. # Flow control ## Wait The Wait node serves as a flow controller within the Workflow editor, allowing for the **delay of workflow progression**. It’s commonly employed to ensure synchronization of data and communication with remote services is completed before advancing to the next node. By double-clicking the Wait node, you can specify the **amount of time** and **the time period** (minutes, hours, and days). The minimum time value is 1 minute, and there is no maximum limit. ![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/wait_node.PNG) You can monitor workflow executions currently paused by a Wait node under the [Running workflows tab](/v1/docs/workflow-logs#running-workflows). ### Wait output | ![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/then.PNG) | The **then output** serves as the point where all subsequent workflow nodes should be connected. | | --- | --- | **What happens if you change or inactivate the workflow?** - Inactivation: If you [inactivate](/engine/docs/workflow-configuration#activate-and-inactivate-a-workflow) the workflow, new runs will stop, but **workflows that are already waiting will continue**. - Impact of changes: Workflows run based on a snapshot taken when they start. Any **changes you make will only apply to new runs**, not to workflows that are already waiting. --- ## Variable assign The **Variable assign** node makes a value available to later nodes on the same branch during the current workflow run. - Set the **name** of the new variable This name is used to reference the variable in subsequent filters and actions. - Define the **value** of the variable Enter a fixed value or an expression. An expression can read [transported data](/engine/docs/workflow-configuration#transported-attributes) or use `Volt` to calculate the value. ![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/variable_assign.PNG) *These examples illustrate how the date of the purchase can be calculated and stored in a variable.* ### Variable assign output | ![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/variable_assign_node.PNG) | The **success** output serves as the point where all subsequent workflow nodes should be connected. | | --- | --- | ### Example: Add customers to different lists based on the claimed reward This workflow uses a custom entity to map each reward ID to a customer list ID. The `reward` event includes the ID of the claimed reward in `event.reward` event attribute. ![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/reward_event(1).png) **Entity lookup** uses this value to find the matching mapping record. This lets one workflow path use one **Add to list** action for different rewards instead of creating a separate branch for each reward. See the `reward` [event](https://developers.antavo.com/docs/internal-events#reward). | Reward claimed | `reward_id` in the mapping | `list_id` in the mapping | | --- | --- | --- | | Coffee voucher | Coffee voucher reward ID | Coffee fans list ID | | Cinema voucher | Cinema voucher reward ID | Movie fans list ID | Create a custom entity with the ID `reward_list_mapping` and two string attributes: `reward_id` and `list_id`. Mark `reward_id` as unique so it can be used as the **Entity lookup** filter. Add one mapping record for each reward in the table, using the reward's actual ID and the ID of its destination list. Add or update a mapping record whenever a reward is added or its destination list changes. See [Custom entities](/engine/docs/custom-entities). Configure the workflow to run on the `reward` event. Add an [**Entity lookup**](/engine/docs/actions#:a10:-Entity-lookup) node and set it up as follows: - Select `reward_list_mapping` as the entity type and `reward_id` as the filter attribute. - Enter `{event.reward}` as the lookup value. This is the ID of the reward claimed in this workflow run. - Enter `reward_mapping` as the transport variable name. Later nodes can use this name to refer to the mapping record returned by the lookup. ![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/entity_lookup.png) Add a **Variable assign** node before **Add to list** and configure its fields. This node copies the mapped list ID into a workflow variable that **Add to list** can select. - Enter `target_list` in **Name**. This is the variable you will select in **Add to list**. - Enter `{reward_mapping.list_id}` in **Value**. This expression reads the destination list ID from the mapping record added to transport by **Entity lookup**. ![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/variable_assign.png) Connect [**Add to list**](/engine/docs/actions#:a10:-Add-to-list) to the success output of **Variable assign**. In the list field, select **Dynamic value** and choose `target_list`. ![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/add_to_list.png)