Skip to main content
All CollectionsSwantide Workflows
Setting up Swantide Round Robin Package
Setting up Swantide Round Robin Package
Andrew Tzikas avatar
Written by Andrew Tzikas
Updated over a week ago

Overview:

Swantide’s Round Robin Feature is deployed via a Workflow Package.

When these this Package is deployed, you can set your Round Robin Assignments co route leads to different reps by leveraging Salesforce’s Lead Assignment Rules.

The workflow package will deploy two Custom Objects (Round Robin and Round Robin Member) and a list of Flows and Apex Classes which you can review under the section Package Components.

Part 1: Set up Queues

  1. Go to Setup

    1. From your home screen in Salesforce, it will be the cog wheel Icon on the top right corner.

    2. Once in Setup > in Quick Find located on the left top right corner, type “Queues”

  2. Click “New”

  3. Label the Queue - in the screenshot I labeled this "Mid-Market"

  4. Add the Lead Object under Selected Objects

  5. Do not add any Queue Members, this is what Part 2 will cover.

  6. Click Save

Part 2: Add Round Robin and Round Robin Member Tabs

  1. Click the pencil icon in the Navigation Row of your Tabs

  2. Click Add More Items

  3. Add the two objects

    1. Round Robins

    2. Round Robin Assignees

Part 2(a) - Create a Round Robin Record under the Object Round Robin

Once those Tabs are in place, on the “Round Robin” Object Tab, create a Record called “Mid-Market”. This is what the name of the Robin Robin Queue will be called under the Round Robin Object and will be used to pass the Group Name into the Apex Class that will eventually assign Leads to members under this group.

Make sure IsActive is Checked.

Repeat this process as you create more Queues in Setup.

Part 2(b) - Create Round Robin Members under the Round Robin Record Created in Part 2(a)

Now that you have created at least 1 Round Robin Record, it's time to add members under that Record.

Under the Tab “Round Robin Assignees” click New.

  1. Give the record a Name (IE the Name of the Rep + the Queue Name / Round Robin Record they belong to)

  2. Add the User’s Lookup. This will look up the User’s ID in Salesforce in associate it to the Round Robin Assignee Record.

  3. Select the Round Robin Record in which they should belong too.

  4. Keep IsActive checked.

  5. Click Save

Repeat this process when needing to add more members to a particular Round Robin Group.

By this point, you have:

  1. Set up a Queue for Lead Assignments

  2. Created 1 Round Robin Record

  3. Created 1 Member under the Round Robin Record to get Leads for Assignment

Now its time to Assign the leads to a queue using Lead Assignment rules.

Part 3: Setting up Lead Assignment Rules:

Go to Setup > Quick Find > Lead Assignment Rules. Here is where you are going to route leads to a particular Lead or Queue on Lead Create.

💡 Lead Assignment Rules apply to Leads on Lead Create.

There are ways to re-run lead assignment rules on Lead Update using additional Apex Classes but for the purpose of this document, just beware of this constraint.

Within Lead Assignment Rules Assignment, here you can configure your criteria for Lead assignments for Leads as they get created.

Example of a Lead Assignment Rule:

IF:

  • Owner Assigned from Account Ownership ≠ True

  • Employees Range is > 50

Then Assign this Lead to the Queue:

Based on the Above Example, then this could look something like this:

  1. Step 1: Sort Order:

    1. Sets the order of which when a Lead Enters the Lead Assignment Rules, which rule will be checked first.

  2. Step 2: Select the criteria for this rule entry:

    1. Using the example above we said Account Ownership not equal to True && Employee Range is greater than 50. But of course, customize this to your needs!

  3. Step 3: Select the user or queue to assign the Lead to:

    1. Assign this to the Queue that you created in Part 1: Set Up Queues by clicking over user, and selecting Queue. Then use the magnifier glass to search for the Queue you created! Our example was Mid-Market.

Assigning a Lead to a Queue > Swantide Round Robin Flow

Once the Lead is Assigned to a Lead Queue, the Lead Flows for Round Robin will be triggered based on the Lead being assigned to a OwnerId starting with “00G”.

💡 When a Lead is Assigned to a Queue, the Lead is then now assigned to a Owner of a Lead Queue, which Lead Queue IDs always start with “00G”

Why is 00G important to know? Because, in the flows for Round Robin Assignment, they are set to trigger when OwnerId of the Lead “Starts with 00G” > See Below

When this flow gets triggered, it then routes the Lead Record to the ApexClass “AssignLeadtoRoundRobin” and passes the:

  1. Lead RecordId

  2. Queue Name of the Lead Queue (In this case "Mid-Market" based off the Queue name and Round Robin Record you created.

    1. Which this then gets picked up in the Apex Class, and matches the Queue Name to the Round Robin Record you created in Step 2(a)

Debugging Round Robin Assignments:

Useful tips and tricks to debug issues around Lead Assignment Rules and Round Robin.

  1. Create a Lead Field History Tracking report based on the Lead Id in Scope.

    1. See if any fields in scope were updated that align with the criteria of Lead Assignment Rules

  2. Create a Swantide Workflow Runs Report

    1. Report: Swantide Workflows with Swantide Workflow Runs and Related to Lead

    2. Filter = ALL Swantide Workflows and Workflow Name Contains "Round Robin"

    3. Used the LeadId as a filter to the report (Related to Lead: Lead ID)

    4. See any automations that were ran pertaining to the Lead, specifically with any workflows where the “Record Name and Flow” field contains “Round Robin”

Consideration When Creating Leads

In order for leads to go through the Round Robin upon creation, you need to check the box "Assign using active assignment rule". If this is not checked, the leads will be assigned to the person who creates the Lead record. Alternatively, you can make this the default setting by following the below steps:

  1. Click the gear icon.

  2. Click Setup.

  3. Click Object Manager.

  4. Select Leads.

  5. Select Leads Page layouts.

  6. Click New page layout and at the 'Create New Page Layout' screen, select your existing page layout and specify the assignment rule checkbox differentiation.

  7. Click the 'Layout Properties' button on the palette and disable the 'Show on edit page' and 'Select by default' Case Assignment Check-box and click OK, then click Save.

  8. Test and confirm that when a user creates a lead, the 'Assign using active assignment rules' checkbox is set to true. Save the lead. Click Edit on the test case and confirm that the 'Assign using active assignment rules' checkbox is set to false.

Package Components:

What comes in the Package?

Outside of the the Custom Object Round Robin and Round Robin Member and those custom fields, the following items also get deployed into the Customer Environment which is the core feature of this package.

API Name

Metadata Component

Description

Swantide_Batch_Supported_With_Override

Flow

When this box is checked, allows RevOps Manager to assign an Override to a Rep for X number of Round Robing Iteriations.

Swantide_Deactivate_Round_Robin_Member_when_User_is_Deactivated

Flow

When a User is Deactivated In Salesforce, and was a Round Robin Member, this flow unchecks the “IsRoundRobinMember” Checkbox on the User Record.

Swantide_Deactivate_Round_Robin_Members_on_User_Deactivation

Flow

Once the "IsRoundRobinMember” checkbox is updated to False, grabs the Round Robin Member and Loops through all Round Robin Membership records and updates “IsActive” to False.

Swantide_Round_Robin_Batch_Supported

Flow

Supports Batch of Leads to be Assigned to Round Robin Members on Create.

Swantide_Round_Robin_Batch_Supported_on_Update

Flow

Supports Batch of Leads to be Assigned to Round Robin Members on Update.

Swantide_Round_Robin_Out_of_Office_Flows_with_User_Check

Flow

Allows the Sales Manager or Rep to set when they will be OOO so they will not receive Leads while they are out.

Swantide_Round_Robin_User_Availability_Check

Flow

If OOO is set to True or License Check is changed and set to False (IE the User is no longer Active) then updates the IsActive Checkbox accordingly.

Swantide_Set_an_Override_Assignment_for_Round_Robin_Member

Flow

A flow that allows Override Members to receive Leads for X amount of assignments when the Swantide_Batch_Supported_With_Override field is Checked to True

AssignLeadtoRoundRobin

Apex

The Apex Class that handles the Round Robin Logic

AssignLeadtoRoundRobinTest

Apex

The Apex Test Class that handles the Round Robin Logic

Did this answer your question?