How do I use formula conditions in a flow

In Flow Builder, Formula Conditions allow you to build logic that is more complex than simple “equals” or “contains” filters. You use these when you need to perform math, manipulate text, or check multiple related conditions at once before the Flow moves to the next step.

Step 1: Create a Formula Resource

Before you can use a formula in a condition, you must define it as a Resource in your Flow.

How do I use formula conditions in a flow | Salesforce | Step 1
  • Open your Flow and click the New Resource button in the left-hand manager sidebar.
  • Resource Type: Select Formula.
  • API Name: Give it a clear name (e.g., Is_High_Priority_Renewal).
How do I use formula conditions in a flow | Salesforce | Step 1.1
  • Data Type: Choose the type of result the formula will produce (usually Boolean for true/false conditions, or Currency/Number for math).

Step 2: Write the Formula Logic

Inside the formula editor, you can combine record fields, global variables, and functions.

How do I use formula conditions in a flow | Salesforce | Step 2
  • Example 1 (Boolean): To check if a deal is over $100k AND closing this month:
    AND({!$Record.Amount} > 100000, MONTH({!$Record.CloseDate}) = MONTH(TODAY()))
  • Example 2 (Text): To check if an Account name contains “Urgent”:
    CONTAINS({!$Record.Account.Name}, “Urgent”)

Step 3: Use the Formula in a Decision Element

Once the resource is created, you apply it to a Decision or Filter.

How do I use formula conditions in a flow | Salesforce | Step 3
  • Add a Decision element to your Flow canvas.
  • In the Resource box for your outcome, search for and select the formula you just created (e.g., {!Is_High_Priority_Renewal}).
  • Operator: Select Equals.
  • Value: Select $GlobalConstant.True.

Step 4: Direct Formulas in Elements (Newer Feature)

In recent Salesforce updates, you can sometimes write simple formulas directly inside the element without creating a resource first.

  • When setting a field value or a filter, look for the “New Formula” option in the dropdown list. This keeps your Flow Manager cleaner by not having dozens of saved resources.

Step 5: Troubleshooting "Invalid Formula"

  • Data Type Mismatch: If your Decision is looking for a Boolean (True/False), ensure your Formula resource is also set to the Boolean data type.
  • Null Checks: If your formula references a field that might be empty, the Flow might fail. Use the ISBLANK() function to protect your logic.
  • Syntax: Always click Check Syntax before saving to catch missing parentheses or commas.
Last Updated 2nd February 2026.

Was this article helpful?

We publish our Knowledge Base to help individuals and businesses resolve common issues across websites, advertising platforms, Salesforce and other digital systems.

We regularly review and update our guides, but the platforms, software and services covered can change without notice. As a result, screenshots, settings, features or recommended processes may differ from those available when an article was last reviewed.

The information provided is general guidance and should not be treated as advice specific to your systems or circumstances. UTDS Optimal Choice cannot accept responsibility for errors, data loss, service disruption or other issues resulting from changes made by following these guides.

If you are unsure about any of the steps, particularly where a change could affect live systems, data, tracking or business processes, we recommend speaking to us before making the change. Our team can review your specific setup and provide advice based on the current platform and configuration.

Time for some professional support?

Our team area ready to help. As one of the few digital agencies that is a registered Salesforce Consulting Partner and Google Partner Agency, UTDS Optimal Choice is expertly positioned to support you across your entire digital landscape.