IsNull vs IsEmpty in Salesforce Flow: Key Differences Explained

IsNull vs IsEmpty in Salesforce Flow debate has gained new relevance with recent platform updates. Understanding when to use each operator can make or break your flow logic—especially when validating user inputs or branching decisions.

In this blog, we’ll break down the differences, use cases, and best practices for using IsNull and IsEmpty in Salesforce Flow, ensuring your automation runs smoothly and accurately.


Table of Contents


What Is IsNull in Salesforce?

The IsNull() function checks whether a field is explicitly null. Traditionally used in formulas, it’s ideal for numeric, currency, date, and percent fields—especially when you’re treating blank values distinctly from zeros or defaults.

ISNULL(field_name)

Example Use Case:

AND(
  ISPICKVAL(Status__c, "Approved"),
  ISNULL(Approved_Amount__c)
)

This ensures that the Approved_Amount__c field is populated before moving forward when a record is marked “Approved”.

In the below flow, we are checking if Annual Revenue (a number field) is null or not

Checking IsNull vs IsEmpty in Salesforce Flow
Flow checks if the numeric field Annual Revenue Is Null

🔎 Important Note:
For text fields, ISNULL will always return FALSE, even if the field appears empty. In such cases, use ISBLANK() or the newer Flow operator Is Blank.

Flow checks if Description is Blank
Flow checks if Description is Blank

What Is IsEmpty in Salesforce Flow?

Introduced in Salesforce Summer ‘24, the Is Empty operator in Flow Builder is a game-changer.

  • For collections: It checks whether the collection contains any records.
  • For text values: It checks whether the string is truly empty or contains only whitespace.
  • For other data types: It evaluates null values.

Why it matters:
Previously, admins had to use an Assignment element + Decision logic to check if a collection was empty. Now, Is Empty makes this seamless.

🧠 Example Flow Use Case:

You can now do:

Decision Element: “Check if Opportunity Line Items Exist”
→ Condition: {!OpportunityLineItems} Is Empty → TRUE

Instead of multiple steps with collection count comparisons.


IsNull vs IsEmpty in Salesforce Flow: Key Differences

FeatureIsNullIsEmpty (Flow)
PlatformClassic (Formulas, Validation Rules)Flow Builder
Text FieldsAlways FALSETRUE if empty or whitespace
Collection CheckNot applicable✅ Yes
Null Check✅ Yes✅ Yes
Preferred ForNumeric, Date FieldsFlow Conditions & Collections
ReplacesISNULL + WorkaroundsEquals operator with Blank Constant

📌 Pro Tip: Use Is Empty in Flow Builder for modern automation. Use ISBLANK() in formulas for broader compatibility.


Use Cases in Real Salesforce Flows

🧩 Use Case 1: Required Field Check in Flow

Scenario: Ensure Comment__c is filled when Status__c = Closed.

Old Way (Formula):

AND(
 ISPICKVAL(Status__c, "Closed"),
 ISBLANK(Comment__c)
)

New Way (Flow Decision Element):

Condition: Status__c Equals Closed
AND
Comment__c Is Blank → TRUE

🧩 Use Case 2: Ensure Collection Is Not Empty

Scenario: Prevent submission if the Opportunity has no related line items.

Old Way:

  • Assignment element to check count.
  • Decision element compares count.

New Way:

Decision: {!OpportunityLineItems} Is Empty → TRUE

Check Is Empty on collection of Opportunity records related to the Account
Check Is Empty on collection of Opportunity records related to the Account

Best Practices and Tips

  • ✅ Use Is Empty for Flows; it’s optimized and future-proof.
  • ❌ Avoid using ISNULL with Text fields—you’ll get false negatives.
  • 🔄 Replace legacy logic involving Equals "" and blank constants with the modern Is Blank operator.
  • 🧪 Test Flow conditions thoroughly—different field types behave differently.

More Resources


Conclusion

Understanding the IsNull vs IsEmpty logic in Salesforce Flow is critical for building robust, error-free automations. Use Is Empty for collections and modern Flow conditions, and reserve ISNULL or ISBLANK for traditional formula or validation rule contexts.

If you find this blog article useful, do share it in your network by clicking the the social media icons provided.

Feel free to drop in your questions or suggestions on using Custom Permission in Flow.