Create a Round Robin Lead or Case Assignment Rule

First off, what is a "round robin"? Simply put, it’s a rotation through a group. In the context of, the term round robin frequently comes into play when assigning Lead or Case records to users. For example, you might have five sales reps working new Leads and, as an administrator, you want to divvy out all new Leads equally among the five reps. So if you had a 100 new leads, you would want each rep to get exactly 20 Lead records.

NOTE: This example will be for Leads, but the same concept applies to Case Assignment Rules

A round robin assignment rule allows you to equally distribute new Lead records without having to manually assign them using a rotation as shown below:

  • Lead 1 goes to Sales Rep 1
  • Lead 2 goes to Sales Rep 2
  • Lead 3 goes to Sales Rep 3
  • Lead 4 goes to Sales Rep 4
  • Lead 5 goes to Sales Rep 5
  • Lead 6 goes to Sales Rep 1 (notice the rotation?)
  • Lead 7 goes to Sales Rep 2
  • Lead 8 goes to Sales Rep 3
  • ….and so on

To pull this off in Salesforce you’ll need to create two custom fields on the Lead object. The first is an Auto Number field and the second is a Formula field. You’ll see in a moment how to leverage these two fields to assign Leads.

To create our new fields go to Setup > App Setup > Customize > Leads > Fields

Slide down the page past the "out of the box" fields until you see the "New" button where you can create a custom field.

Create Custom New Lead Field

In Step 1 of the custom field wizard, pick the data type "Auto Number"

Step 1 Auto Number

In Step 2

  • Field Label: Lead Number
  • Display Format: {0}
  • Starting Number: 1
  • Field Name: Lead_Number
Step 2 Auto Number

Salesforce assigns a number to this field for each new record created in a sequence (and it’s unique). It cannot be edited by a user. As new records are created the number will increment (i.e. the first Lead is "1″, the next Lead created will get the number "2″, and so on). You will also see a checkbox to tell Salesforce to create a number for existing records. If you need to assign existing records a number, go ahead and check this box. If you leave it blank, only new Lead records will receive a number. Don’t worry that the "Display Format" is only showing one digit in length. It will grow as needed as you get to 10, 100, 1000 etc. Continue through the wizard creating the field

Next we are going to create a formula field that will take the number generated by Salesforce and assign it a value in a range you specify in the formula.

In Step 1 of the wizard specify a Formula field.

Step 1 MOD Formula

On Step 2 of the wizard

  • Field Label: Round Robin ID
  • Field Name: Round_Robin_ID
  • Formula Return Type: Number
  • Options: 0 Decimal Places

Step 2 MOD Formula

In Step 3 you’ll write a formula with the following value:

MOD(VALUE({!Lead_Number__c}) ,3) +1

Step 3 MOD Formula

The MOD function is going to take our Lead Number, do a bit of math and return a number in a range we specify. The "3″ in the formula above means that it will return a number of 1, 2, or 3. This quick Lead View shows how the formula is taking our Lead Number field and creating a Round Robin ID.

Example Round Robin Working

For example if you change the "3″ in the MOD formula to "5″ you’ll get a result of either 1, 2, 3, 4, or 5 for your Round Robin ID.

Now that we have a method to tag each Lead with a Round Robin ID (number), we can leverage this in a Lead Assignment Rule by going to Setup > App Setup > Customize > Leads > Lead Assignment Rules, then click the "New" button.

Create a Lead Assignment Rule

On the next screen give your Lead Assignment Rule a name and click the Active checkbox and click "Save" as in the screenshot below:

Set as the active assignment rule

On the next screen click on the Rule Name

Click Into the Rule Name

Then click the "New" button to start entering rules.

Step 1:

  • Sort Order: 1

Step 2:

  • Field: Lead: Round Robin ID
  • Operator: equals
  • Value: 1

Step 3:

Select the User to be assigned the Lead and (optionally) select an email template to notify the new owner they have just been assigned a Lead. There is an "out of the box" email template called "Leads: New assignment notification (SAMPLE)" that comes with Salesforce that is usually stored in the "Unfiled Public Email Templates" folder.

New Lead Assignment Rule 1


Lead Assignment Email In Unfiled Emails

Create a rule for each rep that needs to be assigned a Lead based on our Round Robin ID. The Sort Order is the order in which the rules are evaluated.

How does Sort Order come into play?

When you have a set of assignment rules, Salesforce evaluates the rule in the order you specify (i.e. the Sort Order). Salesforce checks the Lead record against the first rule (Sort Order 1), and if the criteria is a match, Salesforce reassigns the Lead to the new Owner. If the Lead record being evaluated does not match the first rule, the Lead assignment rule checks the next rule in the sort order and continues until the criteria makes a match. We’ll expand on how to construct and best practices on Assignment Rules in a later blog post.

When you are finished, you’ll have a rule for each person that you want assigned a lead.

Finished Round Robin Entry

TIP: If you want one person to get a certain percentage of Leads, let’s say 60%, you could change your MOD formula to give you ten results. Then on your assignment rule your rule would look something like this:

60 of Leads

That’s it!

If you want to manually test your rule, make sure your page layout has the checkbox "Assign using active assignment rules" displayed. If not, add it to your page layout:

Lead Assignment on Page Layout

Check that box and save the Lead record. Viola! Your lead should be reassigned based on the rules you have in place.

Let Assignment Rules Reassign the Lead

This entry was posted in Administration. Bookmark the permalink.