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:
- Well Commented Flow
- 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!).

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?
- Beginner Adminoloper: comments explain how the flow works
- Experienced Adminoloper: comments explain why the flow works
- 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> |
|
Loop | Loop Through <Object Plural Label> | Loop Through Opportunities |
Collection Sort | Sort <Object Plural Label> | Sort Contacts |
Collection Filter | Filter for <filter type> |
|
Interaction Elements Naming Conventions
Element Type |
Naming Convention |
Examples |
Screen | <Short Description> |
|
Screen Components (For example, Name, Email, Phone, Checkbox, etc) | <Short Yet Meaningful Description> |
|
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> |
|
Record-Triggered Flow |
|
|
Schedule-Triggered Flow | <Object Name> Schedule: <Short Yet Meaningful Description> |
|
Platform Event-Triggered Flow | Platform Event-Trigger: <Short Yet Meaningful Description> |
|
Autolaunched Flow |
|
|
Field Service Mobile Flow | Field Service: <Short Yet Meaningful Description> |
|
Salesforce Scheduler Flow | Salesforce Scheduler: <Short Yet Meaningful Description> |
|
Omni-Channel Flow | Omni-Channel: <Short Yet Meaningful Description> |
|
Evaluation Flow | Evaluation Flow: <Short Yet Meaningful Description> |
|
Autolaunched Orchestration (No Trigger) | Autolaunched Orchestration: <Short Yet Meaningful Description> |
|
Record-Triggered Orchestration | Record-Trigger Orchestration: <Object Name> |
|
User Provisioning Flow | User Provisioning: <Short Yet Meaningful Description> |
|
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
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.
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.
@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.
Great to hear Chungeun! Glad it was helpful!
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.
Totally agree! Thanks for all the support! Very much appreciated 🙌