Update Opportunity Name to a Standard Formula

Prompt

Flow Lab Inc. wants all of their opportunities to follow the same naming convention, but users often forget or use the wrong formula.

Solution

Prework

Out-of-the-box, Opportunity includes Account and Type fields. These would be ideal to use in a standard Opportunity name, but they are not required fields when creating a new Opportunity. One alternative would be to make these fields required for all Opportunities. Then establish a convention: “Account - Type” as the naming convention.

Assuming that the hypothetical company doesn’t want to take this step, create an automatic flow where:

  • Opportunities with either no Account or no Type specified: “Owner - Created Date
  • Opportunities with both Account and Type specified: “Account - Type

The flow will automatically adjust the names of the Opportunity whenever the Opportunity is edited/created.

Build Flow

  1. Create new Record-Triggered Flow.
  2. New Resources > Formula
  • Name_and_Type: {!$Record.Account.Name} & " - " & TEXT({!$Record.Type})
  • Owner_and_Created_Date: "New Opp C/B: " & {!$Record.Owner.FirstName} & " " & {!$Record.Owner.LastName} & ", " & LEFT(TEXT({!$Record.CreatedDate}),10)
  1. Decision
  • Missing Info: {!$Record.Account.Name} is Null TRUE or {!$Record.Type} is Null TRUE
  • Account and Type Available: Otherwise
  1. Update Records
  • Specify Conditions
  • Filter: Id = {!$Record.Id}
  • Name = {!Owner_and_Created_Date} or {!Name_and_Type}