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:

Testing

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

Summary

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 a Salesforce Technical Instructor at Salesforce Ben. He is 14x certified and has worked in the ecosystem for 12 years.

Comments:

    Richard
    July 02, 2020 6:36 pm
    Thanks, this is useful but only for the most simple opportunities. Most will have products, schedules, other child records attached that need to be cloned. A flow with loops works better. I wish Salesforce had more functionality for subscription businesses than just ad-hoc sales.
    Brian
    July 03, 2020 12:22 am
    Hello! Thank you for this getting started article. I have two question though: 1. What do you recommend as a best practice for creating record change processes in Process Builder? Process Builder is a very flexible tool that allows you to create many different processes that fire when an object changes. However, just like triggers, having many different processes fire for the same object removes your ability to control order of execution and makes it really time consuming to hunt down issues. Would you recommend creating a more standard process and making this process an invocable process? 2. What would your recommendation be to a team that wants renewal opportunities to be created some time in the future (i.e. 90 days before the next renewal date? Would you push them to create an opportunity immediately so they can go ahead and document that revenue or would you use a scheduled action?
    Lucy Mazalon
    July 03, 2020 9:11 am
    Thank you for your comment Richard, I agree with you that it will be applicable for simple opportunities, and I have gone ahead and added your insight to the article for everyone's benefit. ...I sense a post idea brewing here.
    sf9to5
    July 03, 2020 5:59 pm
    Hi Brian, 1. Process Builder has gotten smarter over the last year or so, where you can have a better control of what fires when, by structuring the process builder to call out to other process builders based on object and criteria. The idea is to follow the same logic as a one-trigger-per-object model, but for process builders, where you have a more shell based process builder, and then call out to others, or to apex, flows, etc. 2. The time delay on the creation of a renewal opportunity is somewhat business subjective, as it deals with their sales motion and when they want to start having those numbers be apart of the forecast. In the CPQ world, we commonly see the Renewal Opportunity get generated within 30-60 days of the contract being generated, whereas the Renewal Quote, will not get generated until about 90 days before the Opportunity is set to renew.
    Mary Butlin
    July 07, 2020 8:30 pm
    Wonderful to have a step by step guide, thanks Mira
    Mira Shah
    July 08, 2020 10:58 pm
    Thank You Mary. My pleasure. :)
    Austin
    October 07, 2020 8:44 pm
    Mira thank you for this article. We are already using this process and works well and also do not have products yet which makes things simpler. I do have a question about consecutive 2nd, 3rd and 4th renewal opportunities creation. We have sales sign a 12 month contract but offer a 3-month opt out to the client. Therefore, the first opp closed won by sales is with Start and end date of total contract length of 3 months. The requirement is then the first renewal opportunity needs to be with length of 9 months and the consecutive 3rd renewal opp will be 12 months. The 4th and thereafter renewal opp will be 12months that long. 1. What would your recommendation be on how to approach this requirement? I also have two additional formula fields that calculates the true start and end dates. Thank you!
    Mira Shah
    October 14, 2020 2:03 am
    Austin, It's little complex. My suggestion is to try to add another criteria, Stage Closed Won, Auto renew True and formula field Start date true. After that, add Immediate actions. If it doesn't work, then go with flow builder. See the link below. https://help.salesforce.com/articleView?id=flow_builder.htm&type=5 I hope it helps.
    Jessi
    June 07, 2023 9:08 pm
    Thanks for this! My question is, where do you create the Variables?

Leave a Reply