> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/technical-reference/workflow-execution/loops-item-mapping-concurrency-and-result-order.md).

# Loops: Item Mapping, Concurrency, and Result Order

Loop mode applies a child workflow to a list of items. Use it when each item needs the same processing steps. The node variant affects concurrency and conversation handling.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FetyoI7AyLxJddyY1BdoL%2FG025A.mp4?alt=media&token=5437a55e-716b-4387-9937-79b098e9f9d7>" %}

## Before you begin

A child workflow with known inputs and outputs, plus a list whose items match those inputs.

## Loop execution concepts

| Term           | Definition                                                                                                                                   |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Loop item      | One input value processed as part of a list. Keep an item identifier when the result must be matched to an external record.                  |
| Iteration      | One repetition of the loop’s processing for an item. An iteration can have its own run result and failure.                                   |
| Result order   | The order in which completed outputs are presented. Do not infer the execution sequence solely from the final list order.                    |
| Child workflow | The project executed by a project node or project-execution tool. Review its input contract, selected version, permissions, and run details. |

## Configuration options

| Option      | Purpose                                                | Behavior                                                                           |
| ----------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------- |
| Concurrency | Work on more than one item during overlapping periods. | Completion order can differ from input order and provider rate limits still apply. |

## Configure a loop

1. Select the child project and enable loop mode.

![Select the child workflow in the Beta node and review its input and loop settings.](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/sTvd1OsSusbVba1u5Vv9/assets/g025a-05-beta-setup.png)

Select the child workflow in the Beta node and review its input and loop settings.

2. Map the list to the child input and preserve a business identifier with each item.
3. Run the loop and compare each returned value with its input item.

The output contains the results for the supplied items in the node’s documented order.

## Behavior and limitations

The Beta node returns completed list results in input order, even when items finish at different times. Keep child outputs consistent across items and retain an item identifier when you need to match results to records. A missing child output is not necessarily represented by an empty value in the final list.

## Related resources

[Compare the StackAI Project and Beta nodes](/guides-and-quickstarts/workflow-builder/compare-the-stackai-project-and-beta-nodes.md)

[Execution Order and Node Dependencies](/technical-reference/workflow-execution/execution-order-and-node-dependencies.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/technical-reference/workflow-execution/loops-item-mapping-concurrency-and-result-order.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
