For (Loop)
Learn how to create conditional workflows
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 (e.g., Salesforce and QuickBooks) set up.
Step-by-Step Process
Add a Query Operation: Drag and drop a Query action into the flow. Click Configure.
Define the Source as Salesforce and select your account. Specify the Opportunity you want to query.
Add the For Condition: Drag and drop the For condition into the flow.
Configure the For condition to iterate over the products associated with the queried Opportunity. This allows you to process each product individually.
Set Up Conditional Logic: Inside the For condition, add an If Condition to check if the account name matches 'SGDS'.
If the condition is met, proceed to the next steps; otherwise, you can choose to skip or log the iteration.
Insert Customer into QuickBooks: If the account name matches, add an action to insert the customer into QuickBooks using the relevant product and opportunity data.
Debugging: Add a Debug action to print the results of the operation. This will display a debug card with the details of the products associated with the Opportunity.
Run the Workflow: Click the Run button to execute the workflow. The products listed under the Opportunity will be printed as cards, and if the account name matches, a customer named 'SGDS' will be created in QuickBooks.
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