3 Free Ways To Implement Round Robin For Salesforce Leads, Cases and Other Records

    Step by step in this article we go through three different ways of setting up a round robin system for your leads, cases, and other records in Salesforce.

    Completely free.

    We'll also cover the pros and cons of each approach.  Let's go!

    Choose Your Solution:


    1. The Classic MOD
    Round Robin Approach


    Create a new 'autonumber' field on the Lead object.  Call it something like 'RoundRobinLeadCounter'.  When entering the display format, use this: {00000}.

    Every time a new lead is created, this number will increment by one.


    The next custom field you add is the one that does the hard work.  Add a Formula custom field of type Number to the Lead object, called RoundRobinUser.

    There should be zero decimal places and the formula for this field should be:

    MOD( Value(RoundRobinCounter__c) , 4 )+1

    This is for a team of 4 Users.  If you have more or less, change the number 4 to however many Users are in the team.


    For the final custom field create a Number custom field on the User object called RoundRobinUser.
    (Yes, I've intentionally called this the same name as the one in the Lead object - it represents the same thing: the user that will be assigned the lead via round robin)
    For each User you want to distribute leads to, give them a number, starting from 1...
    e.g. If you have the following four members of the team, Bob, Grace, Kim and Gene, you would number them from 1 through 4.


    The last piece of setup is in the Lead Assignment Rules.

    When a Lead is created, the RoundRobinUser formula field will return a number, from 1 to 4.

    Create a Lead Assignment Rule with (in this example) four entries that pair a RoundRobinUser value with each User as in the image below:

    Pros & Cons

    Works best if you only have one team that you want to round robin your leads around.

    When users leave, or are added to the team, you have to go into the Lead Assignment Rules and re-configure it.

    Not really suitable if you have complex routing requirements.


    2. Lowest Count Approach

    Let's imagine here we are assigning new Account records to Users that belong to the Western Sales Team role.


    Add a 'Number' custom field to the User object called RoundRobinCounter.  Set the default value to 0.

    Your Flow is going to increment this counter when the User is assigned a record.


    Open up the Flow Builder (Setup > Flow) and create a Record Triggered Flow.  

    As we are assigning Accounts, in the first screen select Account as our object and we'll trigger it when a record is Created.

    For now, no entry requirements, but you can imagine how you might constrain this Flow to certain Accounts based on any conditions you apply here.



    Add a Get Records element to your flow.  This will get our Round Robin User.

    Call it Get Round Robin User and enter User in the object field.

    In the Filter User Records section, we can constrain which Users we include in this round robin.  In this example, we will constrain it to Users with the role Western Sales Team.  The easiest way to get the RoleId is to run a query in the Developer Console:

    SELECT Id, Name FROM UserRole where Name = 'Role Name'

    Then sort the user records Ascending by the RoundRobinCounter__c field (that we added in step 1).

    For 'How many records to store' select Only the first record.

    Select Automatically store all fields.

    Hit Done.



    Now add an Update Triggering Records element.  

    Call it Assign User to Account, leave everything at default settings and in the Set Field Values for the Account Record section select OwnerId in the field on the left and on the right, find the UserId from the first element - Get Round Robin User.

    This is how we assign the Account record.



    Before adding the final update element, click on the 'New Resource' button in the Toolbox on the right hand side.

    Create a new resource of type Formula, and name it RoundRobinCountPlus1.  

    Datatype is Number with 0 decimal places.

    In the formula box, type:


    This will return our counter, incremented by one and we will use it in our next Flow element.


    Add the final element to your Flow; an Update Records element and name it Update User Count.

    Specify the conditions to identify records and select User as the object.

    We want to update the User record that we have just assigned to the Account, so in the Filter User Records section type Id into the left box and in the right find the Id of the User from the first Get Round Robin User query.

    In the Set Field Values section, set the RoundRobinCounter__c field to the formula resource we created in Step 5 (RoundRobinCountPlus1).

    Save and activate the Flow and you are done!


    You can use this for any object and you can set routing conditions within the Flow.

    Minimal config required when adding new Users to the team(s).

    The Flow can quickly become complex and tricky to manage once you are beyond a simple one or two team setup.


    3. SuperRoundRobin Lite

    Install from the AppExchange and have your assignments automated within minutes.

    No strings attached.  



    It's crazy simple.  Once installed, navigate to the SuperRoundRobin app...


    Create a MatchGroup.  Tell SuperRoundRobin what object you want to assign (e.g. Lead)


    To your newly created MatchGroup, add the team members as Assignees.  Decide whether they should receive email notifications, and whether their out of office and calendar settings should affect whether they get assigned.


    If you want only certain types of leads to be routed to that team, create one or more MatchRules.

    Use any field to create the matching criteria.  In the example below, only leads where the leadsource EQUALS web will be routed to this team.

    Have another team?  Great!  Create another MatchGroup, add them as Assignees and create the rules to route leads to that team.

    Easily updated by Sales Managers, Supervisors, Rev-Ops folks... bliss.

    Ed Ralph
    Ed Ralph
    Creator of SuperRoundRobin and former CIO, COO and CMO.

    Comments are closed.