> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows | Reference

export const InlineImage = ({src, alt = '', height = '1.6em'}) => {
  return <img noZoom src={src} alt={alt} style={{
    display: 'inline',
    verticalAlign: 'start',
    height: height,
    margin: '0'
  }} />;
};

### Intro

This article contains reference information on various Workflows-related topics. Learn more about Workflows in the [overview](/s/article/000005108).

<Note>
  **Glossary:** *Italicized* terms in this article have particular definitions within Workflows. The [glossary](https://domo-support.domo.com/s/article/000005108?language=en_US#glossary) lists the definitions.
</Note>

***

### Shapes

This section provides details about configuring some of the more complex shapes/actions in your workflow. Learn how to add these shapes and others to [create a workflow](/s/article/000005331).

* [Conditional logic](#conditional_logic)
* [Parallel logic](#parallel_logic)
* [Email](#email)
* [General task](#general_task)
  * [Timer event](#timer_event)
* [Custom function](#custom_function)
* [Query table](#query_table)

# Conditional Logic

Adding conditional logic applies if/then statements to your workflow. Based on the answers to the if statements, your workflow continues on a single path. When you add conditional logic, add the next shapes, then return to configure them all.

Add a new shape and choose **Flow Controls** > **Conditional Logic**. Name your shape in the configuration panel.

Use the nodes to add multiple outgoing flows.

<Frame>
  <img alt="add multiple gateways.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002tDpu.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=9b5f9b46381fa054b827485f9fd0ef51" style={{width: 300, height: 166}} width="700" height="388" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002tDpu.jpg" />
</Frame>

<Tip>
  **Add Additional Gateways:** If two outgoing flows are in place, you can still add more flows with the **Add Gateway** option in the corner of the shape.

  <Frame>
    <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zaJp.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=dacd5ca71f195b05573b8e4a4762f980" style={{width: 349, height: 191}} width="918" height="502" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zaJp.jpg" />
  </Frame>
</Tip>

#### Combine Multiple Flows into a Single Flow

You can use a conditional logic shape to combine multiple flows into a single flow. **Any incoming flow to conditional logic automatically activates the shape and moves the workflow forward**.

#### Conditions

For each outgoing flow, you need to configure a condition. During runtime, the workflow travels down the first path that evaluates as true.

<Frame>
  <img alt="add condition name.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002tHNF.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=13ddce8ba303e2429e42c7ea77a74f8c" style={{width: 246, height: 67}} width="432" height="118" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002tHNF.jpg" />
</Frame>

In the configuration panel, you can enter a name and description for the condition and choose a configuration type: [Default](#default_condition_configuration), [Basic](#basic_configuration), or [Advanced](#advanced_configuration). These are described below:

#### Default

A default condition only activates if no other condition evaluates as True. There are no additional configuration fields to complete for a default condition.

<Tip>
  **Best practice:** While it's not required, we strongly recommend configuring a default condition. This is because only one outgoing flow can come from a shape with conditional logic. If no condition evaluates as true, the workflow errors and fails. A default condition ensures that the workflow always has a path to take.
</Tip>

#### Basic Configuration

Basic configuration allows you to create rules with a general expression editor.

You can add multiple rules to the condition if more than one value needs to be evaluated. After adding the initial rule, you have an option to add the rule as an AND or an OR rule. The rules stack and display in associated groups in the configuration panel. Rules in the same group are connected by an AND. Create a new group by making an OR rule. Add as many groups as you need to configure the condition. You can drag a rule from one group to another.

Follow these steps to add a rule:

1. In the **Configuration** section of the panel, select **Add Rule** to open a modal.

   <Frame>
     <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zaLR.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=e48f4dcc508a3ade599d2e893a27ee25" style={{width: 300, height: 512}} width="582" height="994" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zaLR.jpg" />
   </Frame>
2. In the modal, use the **Datalist variable** dropdown to choose a variable that you want to evaluate in the condition.

   Choosing a variable expands the expression editor.
3. (Conditional) If this is not your first rule, use the radio buttons to choose AND or OR logic for the rule. The rules stack.

   <Frame>
     <img alt="Screenshot 2024-09-24 at 6.58.32 PM.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002tHOr.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=7e1aa55c3926316b1ead642ae0e5a9aa" style={{width: 400, height: 373}} width="752" height="702" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002tHOr.jpg" />
   </Frame>
4. Fill out the fields to define your rule. The operation options vary based on your variable.
   * The **Comparison value type** allows you to choose a custom value, a null value, or another variable to evaluate against the selected DataSet variable.
5. After populating all the fields, select **Add Rule**.

Your rule displays in the configuration panel. You can edit and delete rules.

#### Advanced Configuration

Advanced configuration allows you to create rules with expression syntax. Use an advanced expression if you need to reference an Open or Defined Object variable at the parent level, or if you need an operation that isn't available in the basic configuration.

You can enter FEEL syntax to create an advanced rule. Learn about [FEEL <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq0000023r6f.jpg" />](https://docs.camunda.io/docs/components/modeler/feel/what-is-feel/).

You can also insert variables into the expression.

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zaOf.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=23a36de72bbc1206149528d7d1caf1de" style={{width: 301, height: 331}} width="582" height="640" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zaOf.jpg" />
</Frame>

# Parallel Logic

Adding parallel logic forces your workflow to branch into multiple flows that are all active at the same time. Use parallel logic when you want your workflow to perform multiple tasks at the same time.

1. Add a shape and choose
   <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zaA9.jpg" /> **action menu** > **Flow Controls** > **Parallel Logic**.
2. Name your shape in the configuration panel.
3. Add multiple outgoing flows. If two outgoing flows are in place, use the
   <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zaEz.jpg" /> **Add Gateway** option in the corner of the shape to add more.

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zaDN.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=b59461dafe98f432238da8b60fbbe967" style={{width: 301, height: 139}} width="546" height="252" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zaDN.jpg" />
</Frame>

Shapes with parallel logic don't require any more configuration. When a workflow reaches one of these shapes, each outgoing flow automatically begins to complete.

#### Combine Multiple Incoming Flows

Shapes with parallel logic can accept multiple incoming flows. You can use a shape to combine multiple flows into a single flow. When the workflow reaches a shape with parallel logic, it waits for all incoming flows to reach that shape before moving forward.

# Email

Adding an email User Task enables the workflow to automatically send an email to configured recipients. Recipients can respond to the email by using the options embedded in the email body, which display as buttons.

Move through the configuration panel, filling in each section.

<Note>
  **Note:** Emails can only be sent to Domo users.
</Note>

Under **Email Message**, you can use the **Insert variable** dropdown to add an available variable to your email body. At runtime, whatever value is stored in the variable displays in the email.

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZxF.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=5353ebefed8582e22583d4a73212a652" style={{width: 300, height: 473}} width="554" height="874" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZxF.jpg" />
</Frame>

#### Configure Response Options

Under **Response Options**, choose a [data type](#data_types) for the response (**Select data** **type**), the text that displays on the button in the email **(Response** **label**), and the value that returns to the workflow if the button is selected (**Response value** —this field has different options based on the data type you select).

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005za0T.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=95604228070cc2699777f61cd8428e76" style={{width: 300, height: 254}} width="574" height="486" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005za0T.jpg" />
</Frame>

#### Use String Builder

The String Builder feature allows you to combine custom text with variables from the Workflow variables list. Anywhere you can add a custom value, you can use String Builder.

As you map your parameters for email and form User Tasks or any Code Function, you can choose a **Custom** value for your variable and then insert variables and text to create complex expressions. Select **OK** to save your custom mapping. At workflow runtime, the current value of the variable is passed as the parameter.

<Note>
  **Note:** String Builder does not process entire objects, but it does process an object's child variables of the appropriate data type. Learn about objects and other [data types](#data_types).
</Note>

<Frame>
  <img alt="Screenshot 2024-09-20 at 3.22.24 PM.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002pjun.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=86fcb168679084a1cbb1824317ea2d1b" style={{width: 399, height: 373}} width="412" height="385" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002pjun.jpg" />
</Frame>

# General Task

When you choose a general task, you can choose a queue, assign the form to a user, and use the **Select a Form** option to create or add a new form. Learn more in the [Forms](https://domo-support.domo.com/s/article/000005171?language=en_US#forms_in_workflows) documentation.

Variables from any form you add are automatically added as parameters to the configuration panel for your User Task.

<Warning>
  **Required parameters:** A red asterisk beside the parameter name indicates that it is a required field for the form. You must map it for a valid configuration.
</Warning>

After adding a form to the User Task, you can select the form's <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002BZEF.jpg" /> action menu (vertical three dots icon) in the configuration panel to view the following options:

* **<InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq0000026MPh.jpg" /> Preview —** Opens the form preview. From this view you can decide to show/hide the form title and description.
* **<InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq0000026MUX.jpg" /> Exchange —** Allows you to choose a different existing form or create a new form.
* **<InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq0000026Iih.jpg" /> Edit —** Opens the form editor. Learn more in the [Forms](https://domo-support.domo.com/s/article/000005171?language=en_US#forms_in_workflows) documentation.
* **<InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq0000026MEP.jpg" /> Remove —** Removes the form from the User Task, but doesn't delete the User Task or change the type.

<Frame>
  <img alt="Screenshot 2024-08-06 at 12.22.47 PM.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq0000026Lwf.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=232ee46d9899a62e7958bc196fd9d7bd" style={{width: 250, height: 832}} width="478" height="1590" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq0000026Lwf.jpg" />
</Frame>

#### Timer Event

In the configuration panel for a user task or custom function, the second tab is labeled **Timer** and allows you to add up to four timer events to your task or function. You can have one outgoing flow from a timer. If there are fewer than four timers for a shape, you can move a timer to a different corner.

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZkL.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=26cfc7990c310a81e1517f6255bcb6b2" style={{width: 350, height: 237}} width="700" height="474" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZkL.jpg" />
</Frame>

Timers listen to the event and activate an alternate flow if the event doesn't complete within the specified time.

To add a new timer, go to the **Timer** tab in the configuration panel and select **+** **New** **Timer**. Timer 1 displays on the canvas at the shape boundary and in the configuration panel, where you can set the details. In the **Timer** tab, select **+** **New** **Timer** to add up to four timers for that task or function.

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zW1i.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=b342a3037fdd491f05a27c800e37a7ba" style={{width: 300, height: 593}} width="584" height="1154" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zW1i.jpg" />
</Frame>

There are two kinds of timers:

* **Interrupting Timer —** This cancels the task when the timer's configured duration is met and activates the outgoing flow. To configure the timer's duration, map a value to the required **setting** parameter. You can select a duration variable or enter a custom value.
* **Non-Interrupting Timer** **—** This does not cancel the task when the timer's configured duration is met. The task remains active until it is completed, but the timer's outgoing flow is activated. The same mapping options are available for a non-interrupting timer, with one exception: If you want to configure the duration with a custom value, you have the option to add a Time Cycle.

Adding a Time Cycle means that every time the configured duration is met, the outgoing flow is activated. Add a Time Cycle by checking the box, then choose whether the Time Cycle should continue indefinitely or be limited to a cycle number.

* Choosing an indefinite Time Cycle means the non-interrupting timer continues to trigger the outgoing flow each time the duration is met until the task is completed.

* Choosing a Cycle Number triggers the outgoing flow only for the number of iterations defined in the configuration.

  <Frame>
    <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zXU3.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=0365695d5d4ebcba5f7b9cfd9abfaf24" style={{width: 350, height: 260}} width="996" height="740" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zXU3.jpg" />
  </Frame>

# Custom Function

There are a number of different available custom functions. When you select <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zYgD.jpg" /> **Action menu** > **Custom Function** for your shape, these display in three categories:

* Domo General Utilities
* Domo Text Utilities
* Equipment Maintenance

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zSUO.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=da0bfec2940fcfdc7a2944306006c7d0" style={{width: 497, height: 281}} width="1358" height="768" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zSUO.jpg" />
</Frame>

Choose the category and the function package, then select **Add Automation**.

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZ4P.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=e6ee49bff780eca52ee3dddf53c0c95c" style={{width: 500, height: 487}} width="1358" height="1322" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZ4P.jpg" />
</Frame>

The functions opens in the configuration panel. There are two tabs in the panel: **Mapping** and **Timer**. Learn how to [add a timer](#timer_event) above.

In the **Mapping** tab, the function details display, including the package and included parameters.

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZ61.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=9b411a45645b9dd0b20b5bfb41098acc" style={{width: 301, height: 698}} width="594" height="1378" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZ61.jpg" />
</Frame>

#### Map the Input Parameters

You must map all of the input parameters to variables in the workflow.

When you expand the dropdown for an input parameter, all variables of the same [data type](#data_types) from the **Workflow variables** list display as options.

Selecting a variable for an input means that during workflow runtime, the value stored in that variable is passed to the code function and used by the function.

If a variable of the same name and type as the parameter exists in the **Workflows variables** list, it maps to that input automatically.

##### Use a Custom Value

If you do not have or do not want to map a variable for the input, select the **Custom** option from the **Mapping** list.

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZCT.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=6b4b85ac1857e6017fcc6df1824c5667" style={{width: 300, height: 190}} width="584" height="370" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZCT.jpg" />
</Frame>

The **Custom** option opens a central modal where you can enter a specific value for that input. The custom value must follow the formatting of the parameter data type.

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZFh.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=69816f64cf3ba98594137eefe50ae685" style={{width: 301, height: 199}} width="836" height="554" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZFh.jpg" />
</Frame>

#### Map the Output Parameters

Use the dropdowns from each parameter to map the output parameters.

When you expand a dropdown, all variables of the same [data type](#data_types) from the **Workflow variables** list display as options.

Selecting a variable for an output means that during workflow runtime, the value produced by the function stores that variable and replaces any prior value that the variable contained.

If the variable you need to map has not been created, use the **Create Variable and Map** option in the dropdown to automatically create a variable and map it to the parameter.

<Frame>
  <img alt="Screenshot 2024-08-12 at 7.23.37 PM.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002Bmub.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=9eec87e62fb71c8b17303772dec4baaa" style={{width: 299, height: 184}} width="592" height="364" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002Bmub.jpg" />
</Frame>

#### Edit, Exchange, or Remove a Function

In the configuration panel under **Function**, select the <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zWuY.jpg" /> **action menu** (vertical three dots icon) to do the following:

* **Test —** Opens the function testing modal. Learn about [testing](#test_a_function) below.
* **Exchange —** Reopens the action menu so you can choose a different function package or choose another action.
* **Edit —** Opens Code Engine in a new window so you can make changes to the current function. Learn about [Code Engine](/s/article/000005173).
* **Remove —** Removes the function package and reopens the action menu so you can otherwise define the shape.

<Frame>
  <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZSb.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=f6fe63eb019e5574274c38d99322bf0f" style={{width: 300, height: 339}} width="576" height="650" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZSb.jpg" />
</Frame>

#### Test a Function

We recommend testing included functions before deploying your workflow. Follow the steps below.

1. In the configuration panel under **Function**, select <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zWuY-1.jpg" /> **action menu** (vertical three dots icon) > **Test** to open the testing modal.

   <Frame>
     <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZZ3.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=dc50af92a583ee126f47f887e175c470" style={{width: 300, height: 339}} width="576" height="650" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zZZ3.jpg" />
   </Frame>
2. In the **Test** tab of the modal, populate the **Inputs** fields with values that follow the formatting for the data type, then select **Test**.

   The results display in the **Console** tab.

   <Frame>
     <img alt="Screenshot 2024-08-12 at 7.43.46 PM.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002BnFZ.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=02598a583c8188d97cd82bfdcef8d189" style={{width: 548, height: 448}} width="1720" height="1406" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002BnFZ.jpg" />
   </Frame>

# Query Table

The Query Table action allows you to query and retrieve data from a Domo DataSet in your workflow. You can include variables in your query and preview it before sending. Follow these steps to add a Query Table action to a shape.

1. Select a shape on your canvas and select
   <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zYgD-1.jpg" /> **Action menu** (vertical three-dot menu) > **Query Table**.

   <Frame>
     <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zYhp.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=7ad61cff81419929f65e38d9e5007424" style={{width: 500, height: 226}} width="1094" height="494" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zYhp.jpg" />
   </Frame>
2. In the configuration panel, name your query and then select **Create SQL Query** to open the query modal.

   <Frame>
     <img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zSUN.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=b41e5d2e8b5a7076833d5e40dffde8fd" style={{width: 275, height: 383}} width="594" height="828" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000005zSUN.jpg" />
   </Frame>
3. In the modal, choose the DataSet to query. Write your query, inserting variables as needed. You can choose to define your output types.

<Note>
  **Text-to-SQL:** The Text-to-SQL service from Domo. AI allows you to enter natural language and generate the SQL for your query.

  <Frame>
    <img alt="text to sql.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000003kca1.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=fbc2a72541ab38c33ad2c7ed5357736d" style={{width: 847, height: 128}} width="2474" height="374" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000003kca1.jpg" />
  </Frame>
</Note>

4. When ready, select **Run**.

   The results of your query display under **Table**.

   <Frame>
     <img alt="table.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000003kcbd.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=4e12337774374c1500d87ae7fa7395aa" style={{width: 900, height: 515}} width="3120" height="1784" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000003kcbd.jpg" />
   </Frame>
5. Save your query in the modal to return to the configuration panel.

In the configuration panel, you can edit or clear your query and update the output parameters.

### Data Types

Each variable in the **Workflow variables** list must have a data type that designates what kind of value it can store. This also helps with mapping the variables to the [contract](https://domo-support.domo.com/s/article/000005171?language=en_US#inputs_outputs_catalog) (inputs and outputs) of a form in a User Task.

Each data type has a corresponding icon to help you identify the kind of data required/being used, and data types are color-coded. The data types are described below.

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:208;a"><thead><tr><th colspan="1" rowspan="1"><p> Icon </p></th><th colspan="1" rowspan="1"><p> Data Type </p></th><th colspan="1" rowspan="1"><p> Description </p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKWN.jpg" /></p></td><td colspan="1" rowspan="1"><p> Text </p></td><td colspan="1" rowspan="1"><p> A text (string) variable contains values for alpha, numeric, special, or international characters. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKYO.jpg" /></p></td><td colspan="1" rowspan="1"><p> Number </p></td><td colspan="1" rowspan="1"><p> A number (integer) variable contains values for numeric characters only. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKYT.jpg" /></p></td><td colspan="1" rowspan="1"><p> Decimal </p></td><td colspan="1" rowspan="1"><p> A decimal (float) variable contains values for numeric characters only. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKYY.jpg" /></p></td><td colspan="1" rowspan="1"><p> Boolean </p></td><td colspan="1" rowspan="1"><p> A Boolean variable stores only the binary options of true or false. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKYi.jpg" /></p></td><td colspan="1" rowspan="1"><p> Date </p></td><td colspan="1" rowspan="1"><p> A date variable contains a single date value. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKYn.jpg" /></p></td><td colspan="1" rowspan="1"><p> Time </p></td><td colspan="1" rowspan="1"><p> A time variable contains a single time-of-day value. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKZ2.jpg" /></p></td><td colspan="1" rowspan="1"><p> Date-Time </p></td><td colspan="1" rowspan="1"><p> A date-time variable contains a value that includes both a date and time of day value. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKZ7.jpg" /></p></td><td colspan="1" rowspan="1"><p> Duration </p></td><td colspan="1" rowspan="1"><p> A duration variable contains a value for a unit of time, such as five minutes. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gwob.jpg" /></p></td><td colspan="1" rowspan="1"><p> Person </p></td><td colspan="1" rowspan="1"><p> A person variable contains a value for a person ID. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gwqD.jpg" /></p></td><td colspan="1" rowspan="1"><p> Dataset </p></td><td colspan="1" rowspan="1"><p> A dataset variable contains a value for a DataSet ID. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gwtR.jpg" /></p></td><td colspan="1" rowspan="1"><p> Group </p></td><td colspan="1" rowspan="1"><p> A group variable contains a value for a group ID. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002o2v8.jpg" /></p></td><td colspan="1" rowspan="1"><p> Account </p></td><td colspan="1" rowspan="1"><p> An account variable passes an ID that references account credentials. No account credentials are stored in Workflows. Learn more about the <a href="#account_data_type" target="_self"> account data type </a>. </p></td></tr><tr><td colspan="1" rowspan="1"><p><img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000007RVq6.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=13de40279dcd6e2f4a8659ce62e98276" width="33" height="34" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000007RVq6.jpg" /></p></td><td colspan="1" rowspan="1"><p> Files </p></td><td colspan="1" rowspan="1"><p> A files variable contains the ID and path to the chosen file. This is available only in instances where the <a href="/s/article/000005849" target="_self"> FileSets feature </a> (currently in beta) is enabled. </p></td></tr><tr><td colspan="1" rowspan="1"><p><img alt="" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000007RabF.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=e5b11954027a1070e3b7e62feea1d279" width="33" height="30" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000007RabF.jpg" /></p></td><td colspan="1" rowspan="1"><p> Fileset </p></td><td colspan="1" rowspan="1"><p> A fileset variable contains the ID and path to the chosen fileset directory. This is available only in instances where the <a href="/s/article/000005849" target="_self"> FileSets feature </a> (currently in beta) is enabled. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKZC.jpg" /></p></td><td colspan="1" rowspan="1"><p> List </p></td><td colspan="1" rowspan="1"><p> A list variable contains one or more values in a list form. Values are stored starting at index 0 and increment by one for every value including in the mapping. You must configure a list variable with a subtype that specifies what type of list values are stored. The values in the list are subject to the character/format restrictions of the subtype. </p></td></tr><tr><td colspan="1" rowspan="1"><p><InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKYU.jpg" /></p></td><td colspan="1" rowspan="1"><p> Object </p></td><td colspan="1" rowspan="1"><p> An object variable can have multiple child properties and store their corresponding data values. You can configure an object as defined or open, as described below. Object variables are convenient for keeping related data in one variable, such as an address with a city, state, and zip code. <a id="account_data_type" target="_blank" /></p></td></tr></tbody></table>

# Account Data Type

The account data type/variable allows you to connect to your account integrations and insert them into your workflows, forms, and Code Engine functions. At workflow runtime, an ID representing the account is passed. Our account service looks up the ID and passes the account object to the corresponding API through an HTTPS call. This keeps your account more secure since no credentials are stored in Workflows.

When you add an account variable to the **Workflow variables** list, you must populate the **Data Provider** field.

<Frame>
  <img alt="data provider field.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002o0AC.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=7c95d97da3bc31e1eb046cbc1c43d757" style={{width: 299, height: 384}} width="560" height="720" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002o0AC.jpg" />
</Frame>

Choosing a data provider means that when you map a parameter to that variable in the configuration panel, shown below, you can only map an applicable account. In this example, a Google Sheets data provider means that only Google accounts will populate the options for the parameter.

Applicable accounts include ones you have created or that have been shared with you. Learn about [managing accounts](/s/article/360042926054).

<Frame>
  <img alt="Screenshot 2024-09-19 at 1.23.30 PM.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002o8in.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=5bda097edaedddc6efc45088f95a7526" style={{width: 300, height: 357}} width="582" height="692" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000002o8in.jpg" />
</Frame>

# Defined Object

Defined object variables can have child variables. Each child variable stores an individual value of any data type *except* `object.` Workflows don't currently support nesting in defined objects.

To create your child variable, select **Add Child** when creating your object variable and enter a name and data type for it. Repeat to add as many child variables as needed.

<Frame>
  <img alt="add child.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gxmH.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=b09492f5ffdd3a2056fbd812ee731279" style={{width: 174, height: 326}} width="562" height="1052" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gxmH.jpg" />
</Frame>

After adding all child variables, select **Add Variable** or **Update** to add the defined object variable to the **Workflow variables** list.

<Frame>
  <img alt="update object.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gy7F.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=a010b90c45baafb23804d8a699ddb924" style={{width: 174, height: 326}} width="562" height="1052" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gy7F.jpg" />
</Frame>

In the **Workflow variables** list, you can expand a defined object to view its child variables. Hover over the defined object to view and select the <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gp5b.jpg" /> **Expand** option to view the child variables. Select the <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gybt.jpg" /> **Collapse** option to hide the child variables.

<Frame>
  <img src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gqHm.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=0070ace416dc650d791139b51fb8339e" width="514" height="388" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gqHm.jpg" />
</Frame>

<Frame>
  <img alt="collapse object.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gwtT.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=4676d1df66918b8b6f13b9615cbdc0b7" style={{width: 306, height: 188}} width="524" height="322" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gwtT.jpg" />
</Frame>

#### Edit and Delete a Child Variable

You can edit a child variable by hovering over its defined object in the Variables List and selecting <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gwIN.jpg" /> **Edit**.

<Frame>
  <img alt="edit object.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gzPt.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=4fb035f112eeb08f069eed302b0b306b" style={{width: 250, height: 111}} width="518" height="230" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gzPt.jpg" />
</Frame>

The defined object appears above in the panel, and you can change any of the child variables. Select **Update** to save your changes.

<Frame>
  <img alt="Screenshot 2024-07-09 at 4.05.01 PM.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gzXx.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=95f8816a551c3caca83e722c71404be4" style={{width: 250, height: 317}} width="586" height="744" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gzXx.jpg" />
</Frame>

You can delete a child variable by expanding the defined object in the **Workflow variables** list. Hover over the child variable and select **Delete**.

<Frame>
  <img alt="delete child variable d.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/MASerVWvu6gNOdRh/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gzGD.jpg?fit=max&auto=format&n=MASerVWvu6gNOdRh&q=85&s=97c6d3e61a13b1464a3a29770a857a8f" style={{width: 251, height: 86}} width="520" height="178" data-path="images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EMVq000001gzGD.jpg" />
</Frame>

# Open Object

An open object is configured with no defined child variables. The object is added to the **Workflow variables** list and can store a JSON payload without limits to its structure or nesting. Open objects are convenient when the workflow calls an API in a Code Function, and the response is contained in a single parameter.

<Tip>
  **Tip:** Open objects have an "empty" cube icon <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKaG.jpg" /> while defined objects have a "filled" cube icon <InlineImage src="/images/kb/ka0Vq000000Dteb-00N5w00000Ri7BU-0EM5w000006uKaK.jpg" />.
</Tip>
