Flow Naming Convention Tips

Establishing a clear and effective naming convention for your flow resources in Salesforce is a crucial step in optimizing your low-code logic. Thoughtful naming practices not only enhance readability but also simplify resource management within the toolbox and improve the functionality of autogenerated API names. Whether you prefer CamelCase, abbreviations, or full-length descriptors, consistency is key. This article explores practical tips for naming resources, offering insights to help you maintain an organized and user-friendly approach.
Flow Resource Naming Convention Tips
1️⃣ Include Resource Types in Names (for Search)
If you rely on the toolbox’s search functionality, it may be helpful to include the resource type in the name. For example, I avoid abbreviations and use descriptive names like YesChoice or ReasonPicklistChoice, which clearly indicate the type and purpose.
2️⃣ Leverage Resource Manager Grouping
When scrolling through the resource manager, resources are grouped by type in their respective sections. But if you want to leverage search, you may want to include the relevant strings in the name such as Choice or Variable.
3️⃣ Sort by Purpose Instead of Type
Personally, I find it more useful to organize resources by their purpose rather than type. For instance, I avoid using prefixes like “Var” at the beginning of a name. Instead, I append the resource type to the name, resulting in labels like LabelPicklistChoice and LabelOtherTextVariable.
4️⃣ Maximize Autogenerated API Names
Autogenerated API names benefit from clear, consistent labels. Don’t change the autogenerated API names unless you really have to. When dealing with deployments and debugging functionality, API names should lead you directly to the resource names used on Salesforce’s UI.
5️⃣ Abbreviations: Use Sparingly and Consistently
While abbreviations can save space (e.g., using Var for “Variable”), long names are often clearer, especially if you struggle with consistent abbreviation usage. Keep in mind that overly long names might get cut off on certain UI displays. If you cannot be consistent with abbreviations, the long version is better than the short version.
6️⃣ CamelCase or Underscore?
I prefer CamelCase for naming resources (e.g., ReasonPicklistChoice), but this is a matter of personal preference. If the autogenerated API name includes underscores (_), I typically leave them as-is for consistency.
SFXD Wiki, an online resource developed by the Salesforce eXchange Discord (SFXD) community, offers a wealth of information and tools for Salesforce professionals. SFDX recommends that each Flow name begins with its originating domain, typically the associated object, followed by an underscore. A code indicating the Flow type—such as SCR for Screen Flows, SFL for SubFlows, SCH for Scheduled Flows, EVT for Event-Triggered Flows, or EML for Email-Sending Flows—should come next.
This article by Rakesh Gupta on Automation champion recommends prefixes like varB_ for Boolean variables, varC_ for Currency, and varT_ for Text are recommended to denote data types.

2 Comments