How to Build a Round Robin in Salesforce

Home     /     Blog     /     How to Build a Round Robin in Salesforce


The goal of any B2B marketing team is to drive brand awareness, brand association and, ultimately push users to ask for a demo. Most companies fall into the bucket of having almost no leads, and focus purely on outbound efforts.

One customer of ours ran into the opposite problem. They were inundated with high quality leads were running into problems, primarily that reps were cherry-picking the best leads and many weren't being touched at all.

This company asked us to help them solve two critical inbound problems:

  1. They wanted to reduce response time
  2. They want leads distributed evenly

Response Time

According to the the odds of connecting with a lead drops 100x if you touch them in 30 minutes vs 5 minutes and the dropoff rate on qualification is 21x if you touch a lead in 30 minutes vs 5 minutes.

It isn't a surprise that hot leads are more likely to convert than cold leads but the takeaway is that getting leads to reps as soon as possible is key.

Equitable Distribution

Not all leads are created equal. As long as inbound leads have existed, sales reps have gamed the system by cherry-picking the highest quality leads and focusing their energy there.

Enter the Round Robin

Round Robins are used by sales teams to ensure leads are evenly distributed. Round robin-type lead routing will route leads evenly among a team. In an ideal scenario, a basic round robin would do the following:

  • Route leads randomly among your team members
  • Pause routing to reps who are out of office

How Does This Work Conceptually?

When a lead submits a contact me form on your website you would expect the following to occur:

  • Lead is created in Salesforce
  • Next up sales rep is assigned as owner
  • If no contact is made within X minutes, the lead is rerouted

What Tools Work Out Of The Box For a Round Robin?

There are many tools out there that can help route leads among your team. The most commonly used product we see for lead routing is LeanData. LeanData can be great if you need extra features like attribution but for 95% of our customers a custom-built lead routing process works well.

Our customer wanted flexibility to make changes to how leads were routed, wanted to avoid recurring cost and found that many of the most popular tools had features that didn't apply to them.

For example, multi-touch marketing attribution is something lead routing tools offer that really don't apply to most businesses. We tend to recommend a crawl > walk > run approach to administration and development in Salesforce and multi-touch attribution often feels like sprinting for most companies.

We bias action with a focus on shipping, testing and iterating.

What sort of skills do I need to build a round robin in Salesforce?

At a minimum you should be an intermediate Salesforce Administrator. A deep understanding of custom objects, custom fields, Flows and Process Builder will be required to put this process in place. Although you could build this solution with Apex, it isn't required.

Step 1: Design

Custom Object: Round_Robin__c

  • Fields:
    • Name(Text)
    • Is_Active__c(Checkbox)

Custom Object: Round_Robin_Assignee__c

  • Fields
    • Name(Text)
    • User__c(Lookup, User) - [Required]
    • Is_Active__c(Checkbox)
    • Last_Assigned__c(DateTime)
    • Round_Robin__c(Master-Detail, Round_Robin__c)

Flow: LeadRoundRobin

  • Input Variables
    • RRName(Empty string)
    • RecordId(Empty string)
  • Find Record
    • Find Round_Robin_Assignee__c WHERE Round_Robin__r.Name = RRName and Is_Active__c = True
  • Update Record
    • Set Record Owner = Assignee.Id
  • Update Round Robin Assignee
    • Set Last_Assigned__c = NOW()

Process Builder

  • Name: Lead PB
  • Criteria:
    • Record is created
  • Launch flow with variables assigned
    • RRName = Round Robin Name
    • RecordId = Id

Step 2: Build

  • Create Round Robin Object
  • Create Round Robin Assignee
  • Create Flow
  • Create PB

Step 3: Test

  • Create a lead
  • Review Lead History
    • Was Owner changed?
  • Look up Round Robin Assignee
    • Is Last_Assigned__c = NOW()
  • Create a second lead
    • Confirm routing

Step 4: Deploy

  • Create change set
    • Change set components
      • Object:
        • Round Robin + related fields
        • Round Robin Assignee + related fields
      • Flow
        • LeadRoundRobin
      • Process Builder
        • Lead PB
  • Push/Validate/Deploy change set
  • Insert Round Robin records
  • Insert Round Robin Assignee records
  • Activate Process Builder

Step 5: Test Again

  • Insert lead
    • Confirm lead assignment changed
    • Confirm Round_Robin_Assignee__r.Last_Assigned__c is set

What Now?

After having built and deployed several round robins on behalf of customers we've learned how to build these efficiently as well as many of the pitfalls. Some of the most common questions related a round robin are:

Can we re-route a lead if it isn't accepted?

This question comes up often: In short, if a user sets the lead status to Unqualified or Rejected within 30 minutes the user should be moved to the top of the Round Robin.

To do this you would create a process builder on Leads which is invoked if the Status is set to Unqualified or Rejected.

When that happens a flow would be launched to look up Round_Robin_Assignee__c where id = User.Id.

That flow would then need to set Last_Assigned__c to NULL which would effectively put the user at the top of the list for the next lead.

We'd also recommend adding alerts for Sales Ops to review any rejected leads and make changes where appropriate.

Can we integrate this with slack?

There are many ways to achieve this:


Custom build


What if the email of the lead bounces?

New leads in the system aren't always fully qualified(or real) and often you'll need to route an additional lead to a rep. Just like disqualified leads you could create a process so that if an email bounces you invoke the same process builder for rejected leads by setting the lead status to Bounced.

Related Articles