Lead Assignment with Flow

Lead Assignment with Flow: In my Salesforce Admin Interview questions posted yesterday, I mentioned in one of these answers about a recent automation I had built. This was a fictitious answer, designed to show how to frame your answer to the question. But someone took it literally and asked me for a copy of the flow – so I had to build it and here it is. 🙂

Use Case: When a new lead is created, depending on the Number of Employees, Annual Revenue and Industry, we want to set the rating to Hot, Warm or Cold and assign it to a lead queue accordingly.

The criteria are as follows:

RatingNumber of EmployeesAnnual RevenueIndustry
Hot> 100>$5,000,000Communications or Finance
Warm>= 50> $1,000,000Any
Cold< 50< $1,000,000Any

Create Queues

Before we create the flow, we need to create the three lead queues as follows:

Create one for each of the three ratings:

Lead Assignment with Flow - define queues

Do the same for Warm Leads, Cold Leads. You should now have three new queues.

Now on to the flow:

We want to create a Record Triggered flow when a new lead is created.

The final result will look like this:

Lead Assignment with Flow - start criteria

Create a new Flow

Start Criteria:

Lead Assignment with Flow - select object

Next, add a decision element and configure it as follows for the three ratings.

Configure the Hot: rating

Lead Assignment with Flow - decisions

next, do the Warm rating:

Lead Assignment with Flow - rating

finally, the Cold rating:

Lead Assignment with Flow - cold

Under the HOT branch, configure an Update Records Element:

Repeat the Update Records elements for the Warm and Cold branches under the decision element, remembering to change the references to the warm and cold ratings respectively.

Save and activate your flow.

Lead Assignment

Next, we will use the standard Lead Assignment Rules to do the lead assignment to the new queues for us:

Setup -> Lead Assignment Rules

Create a new Assignment Rule and add the three rule entries as shown below:

Make sure the rules are activated!

Note: I originally just created the rule entries under the standard Assignment Rule that already existed and they did not work. Instead, I set that to inactive and created a new Assignment Rule. Maybe deactivating and then activating it again would have worked?

When you have finished, saved and activated your flow, and activated your assignment rules, create a new lead record.

If the Number of Employees is > 100, Annual Revenue is > $5m and Industry = Communications.

When saved, the lead should receive a rating of Hot and now be owned by the Hot leads queue.

The list view for Hot Leads (queue) will now display the new lead record:

Try a warm lead and a cold lead to see if they have the correct ratings and are assigned to the respective queues.


Similar Posts


  1. Eduard, technically you are correct. From a business perspective, I like the idea of using the lead assignment rules because this is the first place an admin should look to see why a lead was assigned. If this was also buried in the flow the new admin would not only need to be experienced with flow but also would need to find the correct flow – depending on how well you use naming conventions this could be simple or complex. The flow just sets all the right values for the assignments to work. One more benefit is the assignment rule can easily be changed.

Leave a Reply