May 1, 2022 By Daryl Moon

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

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

Create one for each of the three ratings:

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:

Start Criteria:

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




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.

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.