5 ways to do round robin assignments in Salesforce

5 ways to do round robin assignments in Salesforce

1) Round robin with Lead Assignment Rules (LARs):

The basic idea of the Salesforce Help document is to create an auto-number field that counts the number of leads and a formula field that calculates the “Round Robin Id” by using the MOD function.

Afterward, Lead Assignment Rule Entries that match the “Round Robin Id” are hard-coded to a particular sales rep.

The advantages:
1. It is relatively simple and does not require complicated automation.
2. It is built-in and comes with no strings attached, except for the Salesforce license cost.

The disadvantage:
1. The Lead Assignment Rules only work for leads, and not for other types of records.
2. It can be hard to manage. Whenever new reps join the team, or old ones leave, or go on leave, you need to update both the Round Robin Id formula and the rule entries.
3. There is no audit trail, but you can track the owner field’s field history.

The Ugly:
1. The assignment gets skewed if any additional routing rules exist, where some leads are created but not assigned to the group.
For example, if four leads are created and numbered 1, 2, 3, and 4, and two leads (2 and 3) are not assigned
because they used a Gmail address, what happens when Leads 1 and 4 get assigned?
They both get assigned to the rep in slot 2(MOD(1,3)+1 = 2, MOD(4,3)+1 = 2). This may lead to dissatisfaction among reps 1 and 3.

2) Round robin with Process Builder

In a presentation at Dreamforce 2018, Emily Douglas from Formstack discussed a flexible solution for round-robin assignments using Process Builder. This method can be applied to any object, as demonstrated in her example using Contacts.
The process is similar to the “deli counter” process used in the Lead Assignment Rule approach, but the last step happens in Process Builder, which offers more flexibility.

1. The advantages of this approach are that it’s built into Salesforce, works with any object, and maintains versioning as changes are made.
However, the process requires consistency across objects, manual editing of the formula field to change the list of reps, and explicit logic in Process, Builder to do the assignments.

2. The drawbacks of using Process Builder for round-robin assignments include duplication, as you need to maintain consistency across all objects, making it hard to manage.
Additionally, editing the formula field to change the list of reps is a manual task and you need to build explicit logic for the assignments, which takes more effort than the Lead Assignment Rule approach.

Moreover, Salesforce has announced that Flow is the future of workflow automation on the platform, not Process Builder.
Although Process Builder is still supported, it’s not being improved.

3. Another problem with this approach is skewed assignments, just like the Lead Assignment Rule approach. Both rely on a single deli-counter style auto number field, and this will result in skewed assignments if more complex routing rules are implemented. While it’s possible to eliminate some of these issues in Process Builder, it requires a more complex setup.

3) Round robin with Apex

As you may be aware, developers can create entirely customized logic on the Salesforce platform using the Apex programming language.
For round robin assignment, a typical Apex solution can take one of two approaches.
The first approach is a variation of the deli-counter approach discussed earlier, which involves using formula fields to calculate an auto-number value, utilizing the Apex version of the modulo operation (Math. mod), and triggers to initiate the code. However, this approach has the same limitations as the LAR and Process Builder approaches.

The second approach is more versatile and powerful, involving a set of custom objects that define “slots” in multiple round-robin queues. Although it requires greater complexity, this approach enables the distribution of the same type of object equitably to different groups,based on any routing logic that one can conceive.

An entire Apex implementation of round-robin is too intricate to cover in detail here. Instead, let’s examine the advantages, disadvantages, and challenges of utilizing Apex for this purpose.

The advantages:
1. Apex offers a high level of flexibility – If you can describe it, you can likely achieve it with Apex. It is possible to assign any object, utilizing any logic.
2. Round-robin can coexist with other routing rules – It’s feasible to construct intricate routing rules for various user groups without disrupting the round-robin process.
3. Version control – Modern development approaches enable you to track and independently test different versions of the code.

The disadvantage:

1. The disadvantage of using code is that it requires a skilled developer to write, maintain, debug, and modify it.
This means that you’ll need to rely on a developer to create the code in the first place, as well as to maintain and modify it as needed.

The Ulgy:
1. The challenge of using code solutions in Salesforce is that maintaining and modifying them can be difficult over time,
especially if the original author is no longer available. In my experience,most code solutions in Salesforce tend to become increasingly complex and challenging to maintain as time goes on.

Even if you have developers available to support the custom solution, they may have other priorities and be unable to make changes on a timely basis that aligns with the business’s needs. This can result in delays and potential missed opportunities for the organization.

4) Round robin with Flow

We have extensively discussed Salesforce Flow in this forum as it represents the future of Salesforce automation The key aspect to note about Flow is that it offers nearly all the flexibility of Apex, with the approachability of Process Builder’s low-code capabilities. This makes it an excellent tool for creating solutions such as round-robin assignments.

There are many examples of using Flow for this purpose, one of which is found in Matt Bertuzzi’s book, Lightning Sales Ops.
However, in this discussion, we will focus on the solution created by sales operations consultants Kicksaw.

Below is a screenshot of Kicksaw’s Flow in action:

Kicksaw’s solution comprises various components that work together to eliminate the “deli-ticket” skew problem we discussed earlier.
It creates distinct groups of reps with separate territories, allowing for the more complex routing logic.
Additionally, it always assigns the rep who has gone the longest without receiving an assignment.While this solution may not accommodate round-robin assignment with weighting and capping, it is sufficient for basic round-robin scenarios.

My primary concern with the Kicksaw solution is the addition of an unnecessary process builder component to trigger Flow execution.This could easily be achieved with record-triggered Flows.

The Benefits of Using Flow in Salesforce :

1. Flexibility – Flow offers the flexibility to perform most actions that can be done in Apex.
2. Maintainability – With Flow, admins can easily update the logic and modify user lists without relying on developers for help.
3. Routing Rules without Skew – It supports multiple territories and routing logic without compromising the assignment process.
4. Future-Proof (to some extent) – Flow is currently the preferred option for automation in Salesforce, ensuring its relevance in the future.

The Drawbacks of Using Flow in Salesforce:
1. Complex Logic – Utilizing Flow may require sorting out complex logic similar to programming, which may not be comfortable for all admins.
2. Extensive Configuration – The complete Kicksaw solution involves configuring custom objects, queues, and Lead Assignment Rule, in addition to Flow. This can be overwhelming for some users.

The Disadvantage of Using Custom Solutions in Salesforce :

1. Responsibility Falls on You – Custom solutions like Flow ultimately rely on you and your team to maintain and update it.
This can be challenging, especially for complex solutions that require ongoing support and maintenance.

5) Round robin with Sales Engagement Software

I am adding a “4.5” rating here because these recommendations do not strictly involve Salesforce. Instead, they offer the potential to perform basic round-robin assignments using tools you already possess.
Sales engagement tools such as Outreach and SalesLoft come some built-in round-robin capabilities , which could potentially suffice your needs

The advantages:
1. The good thing is that you are already paying for it.

The disadvantage:
1. The bad news is that the functionality is severely limited and typically only applicable to a few specific use cases.”

The Ugly :
1. The ugly truth is that if you decide to remove your sales engagement product, you will also lose any round-robin functionality that you are currently using.