---
category: [Administration & Integrations, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions, Platform and Product Extensions/Integration]
keyword: [Extend, Orchestration Builder, Orchestrate, Orchestration]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Reference: Loop
layout: subsection
---

## Purpose

Use this component to perform an operation or series of operations on every item in a dataset that you specify using Expression Builder.

You can aggregate data outputs from the loop. For more information, see [Add Aggregations](/wcp_docs/GUID-499f45c0-34ac-4d4e-8d46-f9719549acfe-enHYPHENus.html).

## <a id="section_2"></a>Template Availability

This component is available in these orchestration templates:

-   Synchronous
-   Asynchronous
-   Business Process
-   Home Card
-   Integration System
-   Custom Agent Action


## <a id="section_1"></a>Properties

Provide a meaningful <b>Reference Name</b> for the step as it will appear in your orchestration.

Select the <b>Data Type</b> and use Expression Builder to specify the <b>Data Set</b>. When you select the <i>AutoType</i> iterator, Orchestrate determines the iterator type for you and adjusts automatically if that type changes.

To narrow down the data set items that enter the loop, use the <b>Filter</b> expression field.

In the <b>Sort By</b> expression field, specify an expression by whose value the items will be sorted before they enter the loop for processing. The expression must yield a Number or a String. Example: sorting a list of inventory items by part number.

Click <b>Add Sort By</b> to create another sorting rule. When multiple sorting rules exist, Orchestrate processes them in order, sorting the list based on the first rule, then applying the second rule to the sorted list, and so on.

You can drag and drop sorting rule configurations to reorder them. Click the arrow beside the <b>Sort By</b> field to toggle between ascending and descending order.

<b>Note:</b> Orchestrate sorts text types lexicographically and numeric types numerically.

Sorting by string can produce different results in different languages. To specify a language for the purposes of the loop, use the <b>Locale</b> expression field. Doing so temporarily overrides the <b>Default Locale</b> specified in your app's <b>Settings</b>.

