Skip to content
@Lightning-Flow-Scanner

Lightning-Flow-Scanner

🌐 Join the Movement for Evolving Flow Assessments

"Maintaining high-quality Salesforce Flows is critical for the success of your business applications. Lightning Flow Scanner is a powerful tool that can help you identify and address common issues in your Flows." - Mohith Shrivastava, Principal Developer Advocate on Salesforce codeLive 📺

✨ Shaping Transparent & Reliable Flow Assessments Together

We aim to pursue an ever-evolving standard of Salesforce Flow Excellence, helping consultants and developers refine their Flow practices together through open-source solutions. As part of this journey, we encourage community input to learn from each other and continuously shape the open standard that guides Flow development. Check out our Contributing Guidelines for more information in how to get involved! Explore our Flow Analysis 🔍 in Various Forms:

sfdx gif

Integrate Flow Analysis into your CI/CD pipelines. GitHub stars

vsce gif

Analyze Flows directly within VSCode or Code Builder. GitHub stars

lwc gif

Run Flow Analysis natively in your Salesforce Org. GitHub stars

copado image

Perform Flow Analysis as a quality gate within Copado pipelines. GitHub stars

Furthermore, explore our:

  • 📂 Demo Flows – Browse real-world examples of Flow violations and their resolutions.
  • 🏛️ Forum – Discuss best practices, ask questions, and share insights with the community.
  • 💬 Chat Room – Join real-time conversations and collaborate with other Flow enthusiasts.

Extensible Flow Analysis:

Currently, our default rules include:

Rule (Configuration ID) Description
Auto Layout (AutoLayout) With Canvas Mode set to Auto-Layout, Elements are spaced, connected, and aligned automatically, keeping your Flow neatly organized thus saving you time.
Outdated API Version (APIVersion) Introducing newer API components may lead to unexpected issues with older versions of Flows, as they might not align with the underlying mechanics. Starting from API version 50.0, the 'Api Version' attribute has been readily available on the Flow Object. To ensure smooth operation and reduce discrepancies between API versions, it is strongly advised to regularly update and maintain them.
Copy API Name (CopyAPIName) Maintaining multiple elements with a similar name, like 'Copy_X_Of_Element,' can diminish the overall readability of your Flow. When copying and pasting these elements, it's crucial to remember to update the API name of the newly created copy.
DML Statement In A Loop (DMLStatementInLoop) To prevent exceeding Apex governor limits, it is advisable to consolidate all your database operations, including record creation, updates, or deletions, at the conclusion of the flow.
Duplicate DML Operation (DuplicateDMLOperation) When the flow executes database changes or actions between two screens, it's important to prevent users from navigating back between screens. Failure to do so may result in duplicate database operations being performed within the flow.
Flow Naming Convention (FlowName) The readability of a flow is of utmost importance. Establishing a naming convention for the Flow Name significantly enhances findability, searchability, and maintains overall consistency. It is advisable to include at least a domain and a brief description of the actions carried out in the flow, for instance, 'Service_OrderFulfillment'.
Hardcoded Id (HardcodedId) Avoid hard-coding IDs as they are org-specific. Instead, pass them into variables at the start of the flow. You can achieve this by utilizing merge fields in URL parameters or employing a Get Records element.
Inactive Flow (InactiveFlow) Like cleaning out your closet: deleting unused flows is essential. Inactive flows can still cause trouble, like accidentally deleting records during testing, or being activated as subflows within parent flows.
Missing Flow Description (FlowDescription) Descriptions play a vital role in documentation. We highly recommend including details about where they are used and their intended purpose.
Missing Fault Path (MissingFaultPath) At times, a flow may fail to execute a configured operation as intended. By default, the flow displays an error message to the user and notifies the admin who created the flow via email. However, you can customize this behavior by incorporating a Fault Path.
Missing Null Handler (MissingNullHandler) When a Get Records operation doesn't find any data, it returns null. To ensure data validation, utilize a decision element on the operation result variable to check for a non-null result.
Process Builder (ProcessBuilder) Salesforce is transitioning away from Workflow Rules and Process Builder in favor of Flow. Ensure you're prepared for this transition by migrating your organization's automation to Flow. Refer to official documentation for more information on the transition process and tools available.
SOQL Query In A Loop (SOQLQueryInLoop) To prevent exceeding Apex governor limits, it is advisable to consolidate all your SOQL queries at the conclusion of the flow.
Unconnected Element (UnconnectedElement) Unconnected elements which are not being used by the Flow should be avoided to keep Flows efficient and maintainable.
Unused Variable (UnusedVariable) To maintain the efficiency and manageability of your Flow, it's advisable to avoid including unconnected variables that are not in use.
Unsafe Running Context (UnsafeRunningContext) This flow is configured to run in System Mode without Sharing. This system context grants all running users the permission to view and edit all data in your org. Running a flow in System Mode without Sharing can lead to unsafe data access.
Same Record Field Updates (SameRecordFieldUpdates) Much like triggers, before contexts can update the same record by accessing the trigger variables $Record without needing to invoke a DML.
Trigger Order (TriggerOrder) Guarantee your flow execution order with the Trigger Order property introduced in Spring '22

Additional information on the default rules and the extensibility of the engine can be found in our Documentation.

Pinned Loading

  1. lightning-flow-scanner-sfdx lightning-flow-scanner-sfdx Public

    A Salesforce CLI Plugin designed to pinpoint deviations from Industry Best Practices in Salesforce Flows, ensuring standards of business automation excellence.

    TypeScript 115 12

  2. lightning-flow-scanner-vsce lightning-flow-scanner-vsce Public

    A VSCode Extension designed to pinpoint deviations from Industry Best Practices in Salesforce Flows, ensuring standards of business automation excellence.

    TypeScript 35 2

  3. lightning-flow-scanner-app lightning-flow-scanner-app Public

    A Salesforce App designed to pinpoint deviations from Industry Best Practices in Salesforce Flows, ensuring standards of business automation excellence.

    JavaScript 5 1

  4. lightning-flow-scanner-core lightning-flow-scanner-core Public

    A rule engine capable of conducting static analysis on the metadata associated with Salesforce Lightning Flows, Process Builders, and Workflows.

    TypeScript 30 10

Repositories

Showing 7 of 7 repositories
  • lightning-flow-scanner-vsce Public

    A VSCode Extension designed to pinpoint deviations from Industry Best Practices in Salesforce Flows, ensuring standards of business automation excellence.

    Lightning-Flow-Scanner/lightning-flow-scanner-vsce’s past year of commit activity
    TypeScript 35 AGPL-3.0 2 2 0 Updated Feb 17, 2025
  • lightning-flow-scanner-app Public

    A Salesforce App designed to pinpoint deviations from Industry Best Practices in Salesforce Flows, ensuring standards of business automation excellence.

    Lightning-Flow-Scanner/lightning-flow-scanner-app’s past year of commit activity
    JavaScript 5 1 1 0 Updated Feb 17, 2025
  • lightning-flow-scanner-sfdx Public

    A Salesforce CLI Plugin designed to pinpoint deviations from Industry Best Practices in Salesforce Flows, ensuring standards of business automation excellence.

    Lightning-Flow-Scanner/lightning-flow-scanner-sfdx’s past year of commit activity
    TypeScript 115 AGPL-3.0 12 1 0 Updated Feb 17, 2025
  • lightning-flow-scanner-core Public

    A rule engine capable of conducting static analysis on the metadata associated with Salesforce Lightning Flows, Process Builders, and Workflows.

    Lightning-Flow-Scanner/lightning-flow-scanner-core’s past year of commit activity
    TypeScript 30 MIT 10 4 2 Updated Feb 17, 2025
  • .github Public
    Lightning-Flow-Scanner/.github’s past year of commit activity
    0 0 0 0 Updated Feb 13, 2025
  • Lightning-Flow-Scanner/lightning-flow-scanner-copado’s past year of commit activity
    JavaScript 2 AGPL-3.0 0 0 0 Updated Oct 3, 2024
  • lightning-flow-scanner-example-flows Public

    Explore, learn, and enhance your Salesforce Flow scanning capabilities with our curated test data and sample flows that showcase various types of violations, as well as demonstrate how to resolve them.

    Lightning-Flow-Scanner/lightning-flow-scanner-example-flows’s past year of commit activity
    Apex 1 1 0 1 Updated Oct 3, 2024

Top languages

Loading…