# Variable

### Introduction

The Variable action in DBSync Cloud Workflow allows users to create dynamic workflows by utilizing variables that can hold data values. This enables you to make decisions within your workflow based on the values stored in these variables, enhancing the flexibility of your integrations.

### Steps to Use Variable

**Define Variables**

Before using a variable, you need to define the variables.&#x20;

1. Drag and drop a Variable action into your flow.&#x20;
2. Click Configure to set up the variable name and assign it a value.&#x20;

This value can be retrieved from a previous query or hardcoded for testing purposes.![](https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2Fq2emVMjxV8APlwTEP6lb%2Funknown.jpeg?alt=media\&token=33922b9a-f806-4b26-8084-abd9dc07d199)Adding Variables

**Add the If Condition Action**

Drag and drop an If Condition action into your flow. Click Configure to set up the condition.

Configure: Select the variable you defined (e.g., AccountName) and specify the condition (e.g., equals (=) and set the value to SGDS).

**Define Actions for True and False Outcomes**

Below the condition, define actions for both the True and False outcomes.

True Outcome: Add an action that inserts a customer into QuickBooks or logs a success message.

False Outcome: Log a different message or take no action.

**Add a Debug Action (Optional)**

To verify the value of the variable, add a Debug action. Click Configure and in the debug panel, drag and drop the variable from fx panel ![](https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2Fkbf8McU2cJnEiP5COd72%2Funknown.png?alt=media\&token=9efe352c-60d5-45bd-9db4-192f3c9b8a11) in the right side to display its value in the console.

**Save the Flow**

After configuring the variable, click Save to store your flow.

**Run the Integration**

Click Run ![](https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2Fu46nGOLFIbO4JUumRwyi%2Funknown.png?alt=media\&token=fd6d4a52-899e-46ba-aa06-b537590db54f) to execute the flow. Monitor the console output to verify that the variable action is evaluated correctly and that the appropriate actions are taken based on the condition.

**Review Results**

After running the integration, check the console output for any errors or confirmation messages. This will help you understand if the variable action worked as intended.![](https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2Fv1f4kJbuLehjeoK0ukLe%2Funknown.jpeg?alt=media\&token=4836a1ed-f787-4a0b-89f7-6d4262933d29)Console Window

PRO TIP

* Use meaningful variable names and ensure consistency in naming conventions to make your workflows easier to understand and maintain.
* Ensure that you save every Action configuration.

### Related Content

[Implementing Conditional Logic with "If Conditions"](https://docs.mydbsync.com/cloud-workflow/if-conditions): Learn how to apply conditional logic within your workflows to dynamically control the execution of tasks and flows.

“[For” Condition](https://docs.mydbsync.com/cloud-workflow/flow-builder/for-loop): Explore "For" condition, to enhance your workflow logic.

[Creating and Managing Queries](https://docs.mydbsync.com/cloud-workflow/ipaas/functional-concepts/query): Discover how to build and manage queries for retrieving and validating data across your integrations.

[Debugging Flows](https://docs.google.com/document/d/14MCRfISd6NI_tM7yAUu_ci-mz_Y8PzE_Zffq8f4tjDI/edit#heading=h.q8inv0iuih8v): Explore techniques for troubleshooting and debugging your workflows to ensure they run smoothly and efficiently.

<br>


---

# 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/2026_create-your-workflow/action/variable.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.
