CPQLESS
  • Home
  • Platform
    • Resources
    • Best Practices
  • Contact Us

Automate the Opportunity Name with a Flow

6/17/2025

 
This is one of the easiest to implement automations that has saved us from having to add a bunch of fields to a report.  

The idea here is that the name of the opportunity should never be manually filled in by anybody, it should be based on the details of the Opportunity.  When I learned about this process, it was such a time saver for everybody involved!  No more "Follow this format when entering your Opportunity Name" request from managers!  No more reps not following the process... it all just happens and saves a lot of brain cells from having to think what to name the opp.

So here's where it starts:  Create a record triggered flow whenever an Opportunity is created or updated.
The condition is when the Formula evaluates to true.  The formula is "1=1"

When to run the flow is everytime a record is updated and meets the condition requirements:
Picture
Next, you will add an Update Record Element and update the Name of the Opportunity using a Formula.  The formula will need to be a "New Resource" you build.  

Let's call the "New Resource" Formula "Update_Opp_ NameFormula" (its an api so you need underscores for spaces).

Next, you'll need to write the formula.  Formulas can get a bit tricky as you are going to pull in multiple elements from the Opp but for the first example I'll keep it real simple:

Formula:  
TRIM(LEFT( $Record.Account.Name,30)) + " | " + TEXT($Record.Amount)
End Formula

This will create the Opp Name that will look like this:  "Smith Company | 10000" which is great but doesn't convey much... you will want to add in the Opportunity Type, the Close Date.... etc...   So here's a more extreme example that pulls in the Record Type ID and some custom fields:

Formula:
/*New*/
If( $Record.RecordTypeId = "012f10000000LwqAAE",
TRIM(LEFT($Record.Account.Name,30)) + " | New Logo | " + TEXT($Record.Users__c) +" Users | " + TEXT($Record.Hours__c) +" Hours | $" + TEXT($Record.AARR__c) + " ARR | "
+ text(month($Record.CloseDate)) + "/"
+ text(year($Record.CloseDate)),
End Formula

So what the above will do is check the Record Type (this is for New Business) and the put the account name with the term New Logo and add in the number of Users and the number of creative hours with the ARR from the Opp and the Month and Year Close date so the Opp Name now looks like this:
Smith Company | New Logo | 15 Users | 10 Hours | $15600 ARR | 10/2025

And the rep never had to update or change it as it updated along with any other changes they made.  If they push the close date out, the date at the end auto updates.  It's just that easy!

Here's the formula I used for New Business, Upsell, Renewals... it's a lot of it saves the reps a ton of time and makes report reading easier as the Opportunity name tells a good part of the story now!

​/*New - Alternate Account Name*/
If( $Record.RecordTypeId = "012f10000000LwqAAE" && NOT(ISBLANK($Record.Alternate_Account_Name__c)),
TRIM(LEFT($Record.Alternate_Account_Name__c,30)) + " | New Logo | " + TEXT($Record.Users__c) +" Users | " + TEXT($Record.Hours__c) +" Hours | $" + TEXT( $Record.AARR__c ) + " ARR | "
+ text(month($Record.CloseDate)) + "/"
+ text(year($Record.CloseDate)),

/*New*/
If( $Record.RecordTypeId = "012f10000000LwqAAE",
TRIM(LEFT( $Record.Account.Name,30)) + " | New Logo | " + TEXT($Record.Users__c) +" Users | " + TEXT($Record.Hours__c) +" Hours | $" + TEXT($Record.AARR__c) + " ARR | "
+ text(month($Record.CloseDate)) + "/"
+ text(year($Record.CloseDate)),

/*Auto Renewal*/
If( $Record.RecordTypeId = "012f10000000LwvAAE" && $Record.Auto_Renewal__c = TRUE,
"AUTORENEW | " +TRIM(LEFT( $Record.Account.Name,30)) +" | " + TEXT($Record.Users__c) +" Users | " + TEXT( $Record.Current_Year_Term_Months__c ) +" Months | $" + TEXT($Record.AARR__c) + " ARR | End Date: "
+ text(month( {!$Record.Contract_End_Date__c} )) + "/"
+ text(year({!$Record.Contract_End_Date__c} )),

/*Renewal*/
If( $Record.RecordTypeId = "012f10000000LwvAAE",
TRIM(LEFT( $Record.Account.Name,30)) + " | Renewal | " + TEXT($Record.Users__c) +" Users | " + TEXT( $Record.Current_Year_Term_Months__c ) +" Months | $" + TEXT($Record.AARR__c) + " ARR | End Date: "
+ text(month( {!$Record.Contract_End_Date__c} )) + "/"
+ text(year({!$Record.Contract_End_Date__c} )),

/*Upsell - Alternate Account Name*/
IF( 
$Record.RecordTypeId = "0123Z000000PVnvQAG" && NOT(ISBLANK($Record.Alternate_Account_Name__c)),
TRIM(LEFT($Record.Alternate_Account_Name__c,30)) + " | Upsell | " + TEXT($Record.Users__c) +" Users | " + TEXT($Record.Hours__c) +" Hours | $" + TEXT( $Record.AARR__c ) + " ARR | $" + TEXT( $Record.One_Time__c ) + " One Time | "
+ text(month($Record.CloseDate)) + "/"
+ text(year($Record.CloseDate)),

/*Upsell*/
IF(
$Record.RecordTypeId = "0123Z000000PVnvQAG",
TRIM(LEFT( $Record.Account.Name,30)) + " | Upsell | " + TEXT($Record.Users__c) +" Users | " + TEXT($Record.Hours__c) +" Hours | $" + TEXT( $Record.AARR__c ) + " ARR | $" + TEXT( $Record.One_Time__c ) + " One Time | "
+ text(month($Record.CloseDate)) + "/" + text(year($Record.CloseDate)),
$Record.Name
))))))
So here's the update record step and the view of the flow:
Picture
While it looks complicated, it's actually quite easy and you and your team will grow to appreciate just how easy and time saving this is!

Comments are closed.

    Best Practices

    Just some ideas of things to do in your Salesforce

    Archives

    June 2025

    Categories

    All
    Flow
    Opportunity
    Validation Rules

    RSS Feed

Home | Platform | Pricing | Contact | Resources 
​Minneapolis, MN
  • Home
  • Platform
    • Resources
    • Best Practices
  • Contact Us