Salesforce Flow Naming Conventions

Salesforce Flow Naming Conventions

Last Updated on April 7, 2022 by Rakesh Gupta

As a declarative programmer, you always want to create clean flows where naming has to be appropriate so that any other programmer can find it easier to read the flow and understand. 

Now, this may seem meaningless to you but think about a situation where you are investigating a flow to identify why it is failing at run time, and you’re unable to read it, as it doesn’t have naming conventions as well as documentation. 

Readability of flow is very important. It indicates that less time is spent to figure out what the flow does.

There are two items related to Salesforce Flow that are very important when it comes to readability and those are:

  1. Well Commented Flow
  2. Good Naming Conventions

A Well Commented Flow

Let us take a real-world scenario. While driving, you may have seen many signs on the road to help drivers – like signal, speed limit, milestones or route direction. When do we need/read signs? When things go wrong! As long as we’re chugging along happily, who has time to read signs?

Similar logic applies in the flow development and any programming. As long as flows or codes work, who reads comments? Challenges start when either – (1) the flow stops working; (2) customers want modifications to existing flows; (3), the flow is built by someone other than you; or (3) worse! – it could be your ancient, developing, self (oouch!).

Source: Internet

If you create flows to be consumed by other programmers first, and by the flow run time engine second, you may find the need for additional comments to be greatly reduced. How does a Salesforce Adminoloper comment on their flow?

  1. Beginner Adminoloper: comments explain how the flow works
  2. Experienced Adminoloper: comments explain why the flow works
  3. Hardcore Developer: comments explain why other implementations were not chosen

The following screenshot will give you some sense on what to write when it comes to adding comments in your flows.

Good Naming Conventions

In flow, it is good practice to name variables, data elements, logics and Screen elements that describe what they are actually supposed to do instead of naming them randomly.

Below are some naming convention suggestions for Salesforce Flow elements: 

Resources Naming Conventions

Resource Type Data Type Naming Convention

Examples 

Variable Boolean varB_<Short Description> varB_ReadyToInvest
Currency varC_<Short Description> varC_AnnualIncome
Date varD_<Short Description> varD_DateOfBirth
DateTime varDT_<Short Description> varDT_MeetingTime
Multi-Select Picklist varMSP_<Short Description> varMSP_Locations
Number varN_<Short Description> varN_RecordCount
Picklist varP_<Short Description> varP_Status
Record Collection Variable varR_<Object Plural Label> varR_Leads
Record Variable varR_<Object Name> varR_Lead
Text varT_Name varT_TravelDestination
Constant Constant con_Name con_PiValue
Formula Boolean forB_Name forB_ReadyToInvest
Currency forC_Name forC_AnnualIncome
Date forD_Name forD_NextFollowupDate
DateTime forDT_Name forDT_MeetingTime
Number forN_Name forN_RecordCount
Text forT_Name forT_OpportunityName
Text Template textT_Name textT_EmailBody
Choice choice_Status choice_Open
Record Choice Set recChoice_Name recChoice_OpenLeads
Picklist Choice Set picChoice_Name picChoice_StageName
Collection Choice Set colChoice_Name colChoice_OpenOpportunities
Stage stage_Name stage_PersonalDetails

 

Data Elements Naming Conventions

Element Type Naming Convention

Examples 

Create Records Create <Object Name> or 

Create <Object Plural Label>

Create Contact or

Create Contacts 

Delete Records  Delete <Object Name> or 

Delete <Object Plural Label>

Delete Lead or

Delete Leads 

Get Records Get <Object Name> or 

Delete <Object Plural Label>

Get Lead or

Get Leads 

Update Records Update <Object Name> or 

Delete <Object Plural Label>

Update Quote or

Update Quotes 

Update Field Update <Field Name> to value Update Rating to Hot
Roll Back Records Roll Back Records Roll Back Records

 

Logic Elements Naming Conventions

Element Type

Naming Convention

Examples 

Assignment – Record Variable Set <Object Name> Fields  Set Account Fields 
Assignment – One Variable or Field Set <Field Name> to value Set Stage to Closed Won
Decision <Question> Ready to Close the Deal? 
Decision Outcome  <Answer>
  • Close Deal
  • Keep Deal Open
Loop Loop Through <Object Plural Label> Loop Through Opportunities 
Collection Sort Sort <Object Plural Label> Sort Contacts 
Collection Filter Filter for <filter type>
  • Filter for Presidents and CIOs
  • Filter for Sales Team
  • Filters for Buyers 

 

Interaction Elements Naming Conventions

Element Type

Naming Convention

Examples 

Screen <Short Description>
  • Collect Lead Details
  • Collect Policy Details 
Screen Components (For example, Name, Email, Phone, Checkbox, etc)  <Short Yet Meaningful Description>
  • Collect Lead Details Screen Components
    • CLD_Name
    • CLD_Email
    • CLD_Phone
    • CLD_Checkbox
  • Collect Policy Details Screen Components
    • CPD_Name
    • CPD_Email
    • CPD_Phone
    • CPD_Checkbox
Action <Brief Description> Submit Account for Approval
Subflow <Brief Description> Create Task
Parse Multi-Select Picklist

 

Flow Naming Conventions

Flow Type

Naming Convention

Example

Screen Flow Screen Flow: <Object Name> <Short Yet Meaningful Description>
  • Screen Flow: Order Fulfillment 
Record-Triggered Flow
  • Record-Trigger: <Object Name> Before Save
  • Record-Trigger: <Object Name>  After Save
  • Record-Trigger: <Object Name>  Before Delete
  • Record-Trigger: Order Before Save
  • Record-Trigger: Order After Save
  • Record-Trigger: Order Before Delete
Schedule-Triggered Flow <Object Name> Schedule: <Short Yet Meaningful Description>
  • Order Schedule: Send Monthly Invoices
Platform Event-Triggered Flow Platform Event-Trigger: <Short Yet Meaningful Description>
  • Platform Event-Trigger: Update PO on Quote
Autolaunched Flow
  • Subflow: <Short Yet Meaningful Description>
  • Subflow: <Object Name> Handler 
  • Subflow: Add to Slack Workspace
  • Subflow: Lead Handler
Field Service Mobile Flow Field Service: <Short Yet Meaningful Description>
  • Field Service: Complete Work Order
Salesforce Scheduler Flow Salesforce Scheduler: <Short Yet Meaningful Description>
  • Salesforce Scheduler: Outbound New Appointment
Omni-Channel Flow Omni-Channel: <Short Yet Meaningful Description>
  • Omni-Channel: Route Calls to Agents
Evaluation Flow Evaluation Flow: <Short Yet Meaningful Description>
  • Evaluation Flow: Manger Approval Entry Criteria 
Autolaunched Orchestration (No Trigger) Autolaunched Orchestration: <Short Yet Meaningful Description>
  • Autolaunched Orchestration: Employee Onboarding 
Record-Triggered Orchestration Record-Trigger Orchestration: <Object Name> 
  • Record-Triggered Orchestration: Contact
  • Record-Triggered Orchestration: User
User Provisioning Flow User Provisioning: <Short Yet Meaningful Description> 
  • User Provisioning: Azure AD User Provisioning

Formative Assessment:

I want to hear from you!

What is one thing you learned from this post?  How do you envision applying this new knowledge in the real world?

Let me know by Tweeting me at @automationchamp, or find me on LinkedIn.

Proofreader: - Frances Barrera
Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

9 thoughts on “Salesforce Flow Naming Conventions

  1. For Scheduled Flows I’d argue you start the Flow Label with “Schedule” THEN put the object name. All your other flow types seem to start with the type first just for consistency.

  2. I add a Process Number to my flows, email alerts, email templates, action names, apex etc. For example, processes starting with 100 relate to Accounts, 200 to Leads, etc. My first flow is “100 Account Create Before Insert”, then “110 Account Update” uses Email Alert and Templates “110a “, “110b ” and “110c “. This makes organizing and relating components much easier. I also create list views for flow with simple filters “Flows starting with 1” are Account (and perhaps Contact) related flows.

  3. I am studying Salesforce Flow.
    I have to move all of our automation to Flow within 2022.
    Your article helps me a lot in starting of Flow study.
    Thank you so much.

    1. @Chungen, you don’t necessarily have to move “everything” within a year. Unless there isn’t that much automation than go for it. Salesforce isn’t getting rid of the other automations “Workflow” and “Process Builder” but they will be retiring these features from allowing you to create and eventually edit these processes. But this isn’t this release. The retirements are still a few years off and they will probably get a lot of push back and push the retirement further in the future. For most companies the next few years will be of re-evaluation of their automation and working on one sector of automation and slowly migrate things over which will take months/years to iron out as these automations may not act the same way.

  4. Your naming convention for Currency should be varC_ instead of varB. But otherwise amazing artical. We just need everyone to follow and then working in Flows will be another step in the right direction.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.