# Conditions

## **Introduction**

In DBSync Cloud Workflow, **Conditions** provide the control logic needed to execute specific actions only when certain criteria are met. These conditional constructs add flexibility and intelligence to your workflows by enabling decisions and loops during execution. With condition-based actions, you can control the flow of data, apply business logic, and make workflows more dynamic and responsive.

The two primary condition types supported are **If Conditions** and **For Loops**. These let you branch logic or iterate over data sets based on runtime values—ideal for filtering records, applying logic based on specific fields, or looping through arrays and lists for bulk processing. By combining conditions with actions like variable setting, transformations, or sub-flows, you can design workflows that adapt in real-time based on the data being processed.

This section will guide you on how to effectively use conditional logic in your integrations to streamline decision-making and improve workflow efficiency.

### **Key Topics in This Section**

* [**If Condition**](https://docs.mydbsync.com/cloud-workflow/create-your-workflow/actions/conditions/if-condition)**:** Add branching logic to your workflow that runs specific actions only if a given condition is true. Useful for scenarios like filtering invalid records or processing only when specific field values meet criteria.
* [**For Loop**](https://docs.mydbsync.com/cloud-workflow/create-your-workflow/actions/conditions/for-loop)**:** Loop through arrays or lists of records and apply a set of actions to each item. Ideal for processing line items in invoices, orders, or any repeating data structure within a workflow.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mydbsync.com/cloud-workflow/create-your-workflow/actions/conditions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
