Skip to main content
New tool CRON Expression Builder — preview next run times before you schedule Apex. Open the builder →
A glowing 3D blueprint illustrating Salesforce Flow Resources with intricate circuit board patterns.
Flow

Salesforce Flow Resources Explained for Developers

Salesforce Flow Resources are what give an automation memory and flexibility. This is what variables, constants, formulas and text templates each do, and when to reach for a collection variable or a choice set instead.

Key takeaways Salesforce Flow Resources are what make an automation dynamic and flexible: they hold data and calculate values. Variables store data that can change, constants store fixed values. Formulas calculate values inside the flow logic. Text Templates make reusable text content easier to build and maintain. Collection Variables, Stages, and Choices handle multiple data points, guide user interaction, and present options within flows.

Salesforce Flow Resources are what give an automated process memory, flexibility, and the ability to calculate values while it runs. The Flow Builder canvas shows the elements; the resources sit behind them and do the logic and data handling.

Core Flow resource types

Variables

A variable is a placeholder for data you can read and change anywhere in the flow. Like an algebraic variable, its value is not fixed and shifts as the flow executes. Variables are how you hold temporary data, pass values between elements, and keep track of information that changes.

Supported data types include:

  • Text
  • Record
  • Number
  • Currency
  • Boolean
  • Date
  • Time
  • Date/Time
  • Picklist
  • soql-contains-like-includes/" class="auto-link">Multi-Select Picklist

For example, a Text variable named accountId holds a record ID that later elements can refer back to.

Collection Variables

A collection variable holds multiple values or records, like a container or a list. You create one by selecting the "Allow multiple values (collection)" option when you define a variable. One constraint matters: a collection can only store values of a single data type (e.g., all Text values or all Account records). That makes it the resource for processing many records at once, such as updating the status of every Case related to a specific Account.

Constants

Like their algebraic counterparts, constants store fixed values that do not change during the flow's execution. Once defined, the value applies wherever you reference it, and updating it in one place carries the change across every use.

For example, a Text constant named SupportEmail holds your company's standard support email address. When that address changes, you edit the constant definition and nothing else.

Formulas

Formulas in Salesforce Flow work the way Salesforce formula fields do. They calculate a value from other data available in the flow, so your automation calculates instead of carrying a hardcoded result.

For example, a formula can work out a follow-up date by adding 30 days to the current flow execution date, or a discount amount by multiplying a rate by an Opportunity Amount.

Text Templates

Text templates let you build and reuse blocks of text, which is useful for email bodies or record descriptions. They support merge fields for personalization.

For example, a reusable greeting template with the {!Contact.FirstName} merge field personalizes every message a "Send Email" action sends.

Stages

Stages are mostly used in Screen Flows, where they show a user's progress through a guided process. They pair with the progress indicators on Screen elements to show the current step and the overall progress.

Choices

Choices are the options you present to a user in a Screen Flow, usually configured for radio buttons or picklists. Beyond individual choices, Flow has resource types for whole sets of options:

  • Picklist Choice Set: populates choices directly from an existing picklist field on a Salesforce object.
  • Record Choice Set: generates choices from a filtered list of records. Filters define which records qualify, and each one contributes a choice built from its field values.
  • Collection Choice Set: like a Record Choice Set, but it takes the list of records from a record collection variable or from external data sources.

Originally reported by salesforceben.com

Newsletter

One email every Tuesday

New guides, tool updates, and the release-note changes that break things.

No spam. Unsubscribe in one click.

Comments

Loading comments...

Leave a Comment