# Iterate: Iterate

The Iterate: Iterate node is a special kind of **Ask**. Where a normal **Ask** node continues the flow after a satisfactory answer is given, an **Iterate** note will always return and ask the user again.

In the following example, if the user answers "Choice A" to the question "What can I do for you?", the Smart App will resolve "Choice A" and then return to the Iterate node to ask the user again.

<figure><img src="/files/JmepDydCYQGdl4l6sFMM" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/hi2uXu0kIwaMztqsTNbR" alt=""><figcaption><p>Example conversation</p></figcaption></figure>

Because of this returning behaviour, this node can be used as a menu to the different user intents the Smart App can perform.

Every time the user returns to the Iterate node, the question will be asked using a preconfigured "Repeat (1)" or "Repeat (2)" text. After the last one, it will re-iterate the last question over and over again.

<figure><img src="/files/BSzhiODvYX39NMaudARE" alt=""><figcaption><p>Iterate side panel</p></figcaption></figure>

When providing only one or two texts, it works the same way. It will simply re-iterate the last text you provided.

Other than that, this node type works exactly the same as the [Ask: Choice](/studio/flows/nodes/ask-choice.md) node.

## How to use?

1. Create a new node on your canvas of type "Iterate" by right-clicking your canvas and selecting **Iterate: Iterate**.
2. Provide at least one text by entering the question in the Question field, like: "What can I do for you today?"
3. Optionally provide repeat questions in Repeat (1) and (2) that will be used after the first iteration.
4. Optionally add an \_\_unknown\_\_ dialog trigger to respond to cases where none of the links match the user message.
5. Optionally add FAQs in the Iterate side panel (see below).

## Node properties

| Property   | Description                                                                                                        | Explanation |
| ---------- | ------------------------------------------------------------------------------------------------------------------ | ----------- |
| Question   | The initial question                                                                                               |             |
| Repeat (1) | The text to use when asking the user a second time                                                                 | optional    |
| Repeat (2) | The text to use when asking the user a third time. The system will keep on using this text for all following turns | optional    |
| FAQs       | FAQs can optionally be added to avoid cluttering your Flow with simple questions and answers.                      | optional    |
| Routes     | Routes can be added to automatically route to a different Flow when a certain intent is matched                    | optional    |

### FAQs

Iterate nodes usually act as the "main menu" of a Smart App, resulting in a "tree" with a lot of "branches". These branches are often simply **Say** nodes that provide an answer to a question (frequently asked questions, or FAQs in short). It is not uncommon for these FAQs to take up a large part of the visual space of your flow, cluttering the canvas and making it difficult to maintain. Consider the following situation:

<figure><img src="/files/4KwCESXb4mUObYXPMZA1" alt=""><figcaption><p>Flow with many FAQs</p></figcaption></figure>

To solve this issue, the **Iterate** node can hold zero, one or more FAQs. These FAQs can then be maintained in the [FAQ](/studio/content/faqs.md)s page in the Content Section. This removes a lot of complexity on your Flow canvas, enabling you to focus on what really matters. Like this:

<figure><img src="/files/xuZ9OlhOFQDQSM7Ox7Sb" alt=""><figcaption><p>Cleaned up flow</p></figcaption></figure>

The FAQs are no longer visible in the Flow, making the real functionality more visible (in this example, redirecting the user to one of the departments). FAQs can be found in the content section:

<figure><img src="/files/q7IpR8JaWtTqBzFcdq0L" alt=""><figcaption><p>FAQs</p></figcaption></figure>

After defining the FAQs in the Content section, you can link the ones you want to support in your **Iterate** node in the side panel:

<figure><img src="/files/jYYLlfk2hDgbspelSRJx" alt=""><figcaption><p>FAQs linked to this Iterate node</p></figcaption></figure>

### Routes

**Iterate** nodes not only support FAQs but also include a "Routes" feature. Routes function similarly to FAQs but with a key difference - instead of providing immediate answers, Routes match user intents and redirect to different Flows in your Smart App.

#### Understanding Routes

Iterate nodes often serve as the "main menu" of your Smart App. While FAQs handle simple question-answer interactions, Routes allow you to detect specific user intents and guide them to specialized Flows to handle more complex scenarios.

For example, when a user says, "I have problems with my router," a Route can match this to a "Support" intent and redirect them to a dedicated support Flow where they can provide more details about their issue.

<figure><img src="/files/fXYcvS2Npkx5U4u6g2EJ" alt=""><figcaption></figcaption></figure>

#### Benefits of Routes

Just like FAQs, Routes help declutter your canvas by moving complex branching logic out of the main Flow. This simplifies maintenance and allows you to focus on the core structure of your application while managing specialized user journeys separately.

#### How to Use Routes

Routes can be maintained in the Routes page in the Content Section. Each Route connects a specific user intent with a destination Flow. When the system detects that intent in user input, it automatically redirects to the corresponding Flow.

By combining FAQs for simple answers and Routes for complex interactions, your **Iterate** nodes can efficiently handle a wide range of user needs while keeping your Flow design clean and manageable.

## Resources

* [Ask: Choice](/studio/flows/nodes/ask-choice.md)
* [FAQs](/studio/content/faqs.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manuals.dialox.ai/studio/flows/nodes/iterate-iterate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
