Iterate: Continue

Breaks out of the iteration and continues the flow with the next node after the Iterate node

To break out of an iteration node, this Iterate: Continue node can be used. It will stop the iteration and invoke the next node after the iteration. See this example:

Example flow for using continue

In the above example, the Flow will iterate the "What can I do for you" node until the user responds that they are done. When triggered, the Iterate: Continue step will simply break the iteration cycle and execute the next step after the Iterate: Iterate node. In this case, it will Say "Bye" and then Control Flow: Close the conversation.

Nested iterations

In the simple example above, we could have added the "Bye" and Control Flow: Close steps directly inside the "Done" response Flow. However, when using multiple Iterate nodes in your Smart App, you may need to use an Iterate: Continue node. Consider the following example:

Example of using Continue in a nested menu situation

From the main menu, the user will enter one of the sub menus. When they have resolved their questions relating to the sub menu they chose, they may want to return to the main menu rather than ending the conversation altogether. The Iterate: Continue node will end the current sub menu iteration and fall back automatically to the node that triggered it: in this case, the main menu Iterate node above it.

Resources

Last updated

Was this helpful?