Loops

Loop Steps allow a workflow to process a subset of items individually. This is done through a separate workflow that is triggered by a Loop Step in the parent workflow. 

Using a Loop provides access to nested data, Conditions and additional built-in Actions. For example, a Loop Step can be added within a product workflow to process each product variant individually. The Loop could include a Condition for the price of the variant and use the "Set product variant price" Action to change the price of the variant. When the parent workflow runs, each product variant will process in the variant Loop individually.

Compatibility
This documentation is for Canvas workflows only. 

Adding A Loop Step

  1. From a Canvas Workflow, click on the + icon.
  2. From the Add Step menu, select Loop.
  3. Select the items to loop over. For example, in a product workflow, you could choose Variants, then Variant Objects, then click Add Loop.
  4. The Edit Loop form will appear. Click Configure Loop Workflow to be taken to the Loop Workflow.
  5. On the Variant workflow, click the + icon to add Conditions, Actions, etc. 

Navigating Loops

Loop workflows are children of the parent workflow. To get back to the parent workflow, click the parent workflow link in the Start step.

To get to a Loop workflow from the parent workflow, open the Loop step and click Configure Loop Workflow.

Testing Loops

Refer to the Testing Loops section on the Testing Canvas Workflows documentation, linked below.