Salesforce Flow Naming Conventions: A Complete Guide
Consistent naming is the foundation of maintainable flows. Learn the naming conventions used by top Salesforce teams to keep their orgs organized and understandable.
Salesforce Flow Naming Conventions: A Complete Guide
"What does this flow do?"
If you've ever asked that question while staring at a flow named "New Flow 3" or "Account Process Updated Final v2 COPY", you know the pain of poor naming conventions.
Good naming is the difference between an org that's manageable and one that's a nightmare to maintain. This guide covers proven naming conventions for every aspect of Salesforce Flow.
Why Naming Conventions Matter
For Current Development
- Faster navigation: Find flows quickly in a crowded org
- Easier debugging: Identify the right flow when issues arise
- Clearer code review: Understand changes at a glance
For Future Maintenance
- Knowledge transfer: New team members understand the org faster
- Safe changes: Know what a flow does before modifying it
- Documentation: Names themselves serve as documentation
For Collaboration
- Consistent language: Team speaks the same terminology
- Reduced confusion: No more "which Account flow?"
- Better handoffs: Easy to transfer ownership
Flow Naming Convention
The Standard Pattern
[Object]_[TriggerType]_[Action/Purpose]_[Version]Components Explained
Object: The primary object the flow operates on
Account,Contact,Lead,Case,Opportunity- Use standard object names
TriggerType: How the flow starts
BeforeCreate- Before insert triggerAfterCreate- After insert triggerBeforeUpdate- Before update triggerAfterUpdate- After update triggerBeforeDelete- Before delete triggerScheduled- Scheduled flowScreen- Screen flowAutolaunched- Autolaunched/subflowPlatform- Platform event triggered
Action/Purpose: What the flow does
- Brief but descriptive
- Use PascalCase
- Action-oriented when possible
Version: Optional version number
v1,v2, etc.- Helps track iterations
Examples
Account_AfterCreate_CreateDefaultContacts
Account_AfterUpdate_SyncToERP_v2
Case_BeforeCreate_SetPriorityBasedOnAccountTier
Contact_Screen_UpdatePreferences
Lead_Scheduled_DailyQualificationCheck
Opportunity_AfterUpdate_NotifySalesManager
Order_Platform_ProcessPaymentEventWhat to Avoid
❌ New Flow
❌ Account Flow
❌ Test Flow Please Delete
❌ John's Flow
❌ Account Process Updated Final v2 COPY
Element Naming Conventions
Decision Elements
Start with a question word or action:
Pattern: Check_[Condition] or Is_[State]
Check_RequiredFieldsComplete
Check_AccountHasActiveContract
Is_HighValueOpportunity
Is_CustomerPortalUser
Has_RelatedCasesGet Records Elements
Pattern: Get_[Object(s)] or Query_[Object]_[Filter]
Get_RelatedContacts
Get_ParentAccount
Query_Cases_OpenByAccount
Query_Opportunities_ClosingThisMonthCreate/Update/Delete Records
Pattern: [Action]_[Object(s)]
Create_FollowUpTask
Create_WelcomeEmailCase
Update_ContactOptInStatus
Update_AllRelatedOpportunities
Delete_ExpiredTokensAssignment Elements
Pattern: Set_[Variable]_[Value/Purpose] or Assign_[Variable]
Set_AccountOwner
Set_CalculatedDiscount
Assign_CurrentDateTime
Assign_DefaultValuesLoop Elements
Pattern: Loop_[Object/Collection] or ForEach_[Item]
Loop_RelatedContacts
Loop_LineItems
ForEach_SelectedProductScreen Elements
Pattern: Screen_[Purpose]
Screen_WelcomeAndInstructions
Screen_InputCustomerDetails
Screen_ReviewAndConfirm
Screen_SuccessConfirmationSubflow Elements
Pattern: Subflow_[FlowName] or Call_[FlowName]
Subflow_ValidateAddress
Subflow_SendNotification
Call_CalculatePricingVariable Naming Conventions
General Pattern
[type][DescriptiveName]Type Prefixes
| Type | Prefix | Example |
|---|---|---|
| Text | var | varAccountName |
| Number | num | numTotalAmount |
| Currency | cur | curDiscountValue |
| Boolean | is/has | isApproved, hasAccess |
| Date | dt | dtCreatedDate |
| DateTime | dtt | dttLastModified |
| Record | rec | recCurrentAccount |
| Collection (Records) | col | colRelatedContacts |
| Collection (Text) | lst | lstSelectedIds |
Examples
varCustomerEmail
numItemCount
curTotalPrice
isEligibleForDiscount
hasExistingContract
dtExpirationDate
dttLastLoginTime
recParentAccount
colChildOpportunities
lstSelectedProductIdsSpecial Variables
- Loop variable:
current[Object]-currentContact - Input variables:
input[Name]-inputAccountId - Output variables:
output[Name]-outputSuccess
Constant Naming Conventions
Use ALL_CAPS with underscores:
CONST_DEFAULT_STATUS
CONST_MAX_RETRY_COUNT
CONST_ADMIN_EMAIL
CONST_TAX_RATEFormula Naming Conventions
Pattern: fx_[Purpose] or formula_[Calculation]
fx_CalculatedDiscount
fx_FullAddress
fx_DaysUntilExpiry
formula_LeadScoreDocumentation in Names
Description Fields
Always fill in the Description field for:
- The flow itself
- Every decision element
- Complex assignments
- Any non-obvious logic
Comments as Element Names
For clarity elements that only add context:
Note_StartErrorHandlingSection
Comment_SkipIfNoRelatedRecordsImplementing in Your Org
Step 1: Define Your Standard
Customize these conventions for your team:
- Choose your preferred patterns
- Document in a wiki or shared doc
- Get team agreement
Step 2: Name Existing Flows
Prioritize renaming:
- Critical/frequently-edited flows
- Flows with confusing names
- Duplicate-named flows
Step 3: Enforce Going Forward
Make naming part of your process:
- Code review checklist
- Deployment gates
- Documentation requirements
Step 4: Auto-Document
Use tools like FlowDocs to generate documentation that includes:
- Flow names and purposes
- Element inventories
- Variable usage
- Dependency maps
Quick Reference Cheat Sheet
| Component | Pattern | Example |
|---|---|---|
| Flow Name | ObjectTriggerAction | AccountAfterUpdateSyncToERP |
| Decision | Check/Is/Has_ | Check_RequiredFields |
| Get Records | Get/Query | Get_RelatedContacts |
| Create/Update | Action_Object | Create_FollowUpTask |
| Variable | type + Name | varAccountName |
| Collection | col/lst + Name | colChildCases |
| Boolean | is/has + State | isApproved |
| Constant | CONST_ | CONSTMAXRETRIES |
Conclusion
Naming conventions seem small, but they compound over time. An org with consistent naming is:
- Easier to navigate
- Faster to debug
- Simpler to onboard
- Safer to modify
Start with these conventions, adapt them to your team's needs, and enforce them consistently. Your future self will thank you.
Related Articles:
Ready to Automate Your Flow Documentation?
FlowDocs generates comprehensive documentation for all your Salesforce Flows automatically. Free for up to 10 flows.
Get Started Free