---
schema_version: "1"
id: a8ca19ace230b404e832fe824796be0a75e5bdb1e5860695ce209f047f2ec7be
title: Flow Variable Considerations
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_considerations_feature_variable.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_considerations_feature_variable.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9b68cd6d81beaebadc2b870908fb63a15723351dd5d5ed88cd2f37240a006866
description: Before you create a variable resource, understand the behavior of variables in flows.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Flow Variable Considerations

Before you create a variable resource, understand the behavior of variables in flows.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

This video explains what variables are and how flows use them to hold data.

View this [video](https://play.vidyard.com/MppqcKZd36p1YYX8iUruXi.html) in a separate tab.

This video explains variable types including common types, Boolean, Apex-defined, and collection variables.

View this [video](https://play.vidyard.com/Arao1M9qodyVTgW8myyU2J?) in a separate tab.

## Referring to Blank Fields or Resources

- If you leave a field or resource value blank, the value is `null` at run time. To treat a text value as an empty string instead of `null`, set it to `{!$GlobalConstant.EmptyString}`.

## Boolean Variables

- Boolean Types Treat `null` Differently than `false`
- A flow treats `null` as a different value than `false`. For example, if you try to find a record whose checkbox field is set to `null`, no records are returned. Instead, look for records where the checkbox field is set to `false`. If you’re using a variable (such as `myCheckbox = {!varBoolean}`), make sure that the variable isn’t set to `null` before you reference it in your record filter or condition.

## Number Variables

- Number variables are treated as integers by default.

## Percentage Variables

- If a flow uses record variables to manipulate percentage values, test the flow carefully. When you insert a value into a record variable’s percentage field and then reference that field in a formula, the value is divided by 100.
    
    For example, an opportunity’s Probability field is set to 100. If you assign that value to the `{!Opportunity.Probability}` record variable, the value is still 100. But if you create a formula whose expression is `{!Opportunity.Probability}`, the value is 1.

## Record Variables

- Record and record collection variables support only Salesforce objects.

## Available for Input/Output

- Disabling input or output access for an existing variable can break the functionality of applications and pages that call the flow and access the variable. For example, you can access variables from URL parameters, subflows, and processes.
- You can't add new input or output variables to a flow override. While you can remove existing variables, removing an input variable causes a run-time error if the calling component, such as a Lightning component, tries to use the deleted input variable.

## Setting Input Variables

- Process Builder: When a process or flow launches another flow, that flow’s input variables can be assigned values during the launch. However, for a text, picklist, or multi-select picklist variable that isn’t a collection, a value of `null` is converted to an empty string.
    
    ![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_important.png)
    
    Important Support and updates for Process Builder are scheduled to end as of December 31, 2025. See [Workflow Rules & Process Builder End of Support](https://help.salesforce.com/s/articleView?id=001096524&type=1&language=en_US).
    
    After December 31, 2025, you can continue to activate, deactivate, and edit any existing processes. To migrate existing processes, plan your [switch to Flow Builder](https://help.salesforce.com/s/articleView?id=platform.flow_migrate_to_flow_learning_map.htm&release=264.0.0&type=5 "Flow Builder combines the capabilities of workflow rules and Process Builder in a single point-and-click tool, making it easier to create a triggered process. If you created triggered processes with workflow rules or Process Builder, use the Migrate to Flow tool to move them to Flow Builder. Start by migrating and testing in a sandbox environment before moving your new flows to production.") and use the [Migrate to Flow](https://help.salesforce.com/s/articleView?id=platform.flow_migrate_to_flow.htm&release=264.0.0&type=5 "Use the Migrate to Flow tool to convert your Process Builder processes and workflow rules into Flow Builder, including scheduled actions. The tool also supports partial migration of processes for most actions.") tool. For new automations, create flows in [Flow Builder](https://help.salesforce.com/s/articleView?id=platform.flow.htm&release=264.0.0&type=5 "Automation reduces repetitive work and helps your team complete tasks faster and more accurately. With Flow Builder, you can build simple or complex automations, forms, and guided experiences with no code. You can add forms to Salesforce pages and Experience sites, and launch flows using buttons, record triggers, or schedules.").
- Actions: Flow actions let you pass the value of the record's ID field into the flow, but that's it. If your flow has a Text input variable called recordId, the action passes the record's ID into that variable at runtime. If not, it doesn't and the flow tries to run anyway.
- Lightning App Builder: Collection variables, record variables, and record collection variables aren’t supported. The Flow component supports only manually entered values for input variables. Text input variables accept a maximum length of 4,000 characters.
- Subflow element: When you pass a variable to a subflow input, the variable API name can be up to 40 characters long.

## Distributing Flows

- When you distribute a flow, don't pass a currency field value from a Salesforce record into a flow currency variable with a URL parameter. When a currency field is referenced through a merge field (such as `{!Account.AnnualRevenue}`), the value includes the unit of currency’s symbol (for example, $). Flow currency variables can accept only numeric values, so the flow fails at run time. Instead, pass the record's ID to a text variable with a URL parameter. Then in the flow, use the ID to look up that record’s value for the currency field.