Flow / Admins

Launch Renewal Opportunities with Salesforce Flow (+ CPQ Example)

By Andrew Cook

Recurring business with existing customers is a key source of revenue for some organizations – especially those with client contracts that need to be updated or repeated after a certain period of time. Whenever revenue is due, the sale needs to be tracked through the pipeline in Salesforce – this is so that information is reflected across the sales pipeline, revenue forecasts, product trends, and more. 

However, managing renewal opportunities at scale can prove to be time-consuming – a potential source of frustration, especially considering this can be easily automated. In this article, I am going to explain how to make the most of these automations by creating a renewal opportunity via Flow Builder.

Setting the Scene

I am working as a Salesforce Administrator and I have received a requirement to automate renewal opportunities when certain opportunities are “Closed Won”. The auto-created new opportunity in this example has the same details as the previous opportunity, except that the “Stage” is set to “Prospecting” (the first stage of the Opportunity sales process) and the close date should be one year from today (+365 days).

Note: Every business is different; therefore, different businesses have different requirements with opportunities that are auto-renewed and should be carried over to the renewal opportunity. 

What we will do to achieve this is create an “Auto Renew” checkbox field that sales users can select if they want this opportunity to automatically review (or not). Then we will create the Process Builder that will power the automation.

Step 1: Create an Auto-Renew Checkbox

Go to: SetupObject ManagerOpportunity Fields & Relationships →  Select New.

Choose Data Type: Checkbox → Type the Field Label: Auto Renew → Default Value: Unchecked.

Select the profiles you want to have access to this field (indicate what access level each profile will have: Visible, Read-Only or No Access). Then click Next.

READ MORE: Salesforce Profiles Vs. Roles

Finally, choose the Page Layouts. The field should appear on the screen. Then click Save.

Step 2: Create the Flow

Go to: Setup and use the quick find box to search for flows and create a New Flow.

You need to select which type of flow you want to use. For this example, we need a Record-Triggered Flow.

Now, you need to configure how the flow starts. Here, select the Opportunity object, and Trigger the Flow When “a record is created or updated”.

Next,set the entry conditions. We only want the flow to fire for Opportunities that are set to Closed Won, and the Auto-Renewfield is set to False.

We also need to set the flow to run “only when a record is updated to meet the condition requirements”. Lastly, the flow needs to be optimized for Actions and Related Records.

There are a couple of formula variables we need to create for this flow. One is for the new opportunity name, and the other is for the new opportunity close date.

For the name formula, you can use the syntax: {!$Record.Name} + “ – Renewal Opp”.

For the close date, you can use the syntax: {!$Record.CloseDate} + 365. This will set the close date to one year from the date of your current opportunity close date.

We now need to add a Create Record screen element to the flow. This needs to be set to Create a Record on the Opportunity object.

When setting the field values for the new opportunity, select the variables we created above for both the Close Date and Name fields. Stage Name should be set to Prospecting, and the AccountId needs to be set to the Account ID from the record that started the flow.

To ensure multiple renewal opportunities aren’t created, we now need to add an Update Triggering Record element to our flow. The purpose is to set the Auto-Renew on the triggering opportunity to True.

The final flow should look something like this:


To test the flow, you can use the testing functionality built directly into the Flow Builder. To do this, select the View Tests button at the top of the Flow Builder screen.

Now, select Create.

The first thing to do with the test is set the test details. Here we are setting the test to run when a record is updated.

Next we set the initial triggering record. We are selecting the Account Name, Amount, Close Date, and Opportunity Name. Also, we are setting the stage to Prospecting, as this will be updated to Closed Won in the following step.

When setting the details for the Updated Triggering Record, we need to change the stage to Closed Won.

Finally, we set the assertions to the record stage as Closed Won.

You will now be able to run your tests and make sure the functionality is working as expected.

Once that’s done and you’re happy with your flow, don’t forget to activate it.

READ MORE: How to Test Your Salesforce Flow


Recurring business with existing customers is a key source of revenue for organizations, but managing renewal opportunities at scale can be time-consuming.

In this article, I have explained how to easily automate renewal opportunities via Flow Builder, so that sales reps can save themselves lots of time!

The Author

Andrew Cook

Andrew is the Salesforce Technical Instructor at Salesforce Ben. He is 14 x certified and has worked in the ecosystem for 12 years.

Leave a Reply

24th - 27th November


50% off

all courses