For Loop
Learn How to Add For Condition in your Workflow
Introduction
The "For" condition in DBSync Cloud Workflow allows users to create customized workflows by iterating over collections of data. This enables dynamic processing based on specific criteria, making it possible to perform various operations like insert, upsert, or update from a source to a target.
Prerequisites
Before you begin, ensure you have:
A configured project in DBSync Cloud Workflow.
The necessary connectors (for example, Salesforce and QuickBooks) set up.
Use Case
In this use case, we iterate through opportunity products to trigger item creation.
Configure the Flow
In the Flow screen, drag the Flow Action from the Actions palette on the left and drop to the center of the screen.
Click Configure on the flow panel to configure the flow.
In the Flow configuration panel that opens on the right side, enter the required description for the flow and click Save.
Add the For condition and iterate
Drag and drop the For condition into the flow.
Configure the For condition to iterate over the products associated with the queried Opportunity. In the right panel, from the Records in dropdown, select OpportunityLineItems/Records. This allows you to process each product individually.

PRO TIP
When using the "For" condition, ensure that your data set is well-defined and that the items being iterated over are relevant to the operation you intend to perform. This will help avoid unnecessary iterations and improve workflow efficiency.
Related Content
Implementing Conditional Logic with "If Conditions": Learn how to apply conditional logic within your workflows to dynamically control the execution of tasks and flows.
Creating and Managing Queries: Discover how to build and manage queries for retrieving and validating data across your integrations.
Debugging Flows: Explore techniques for troubleshooting and debugging your workflows to ensure they run smoothly and efficiently.
Last updated
