Views:

Scenario Overview

In this business scenario we needed to be able to use a Round Robin system for assigning new leads to Salespeople. This is a fairly typical scenario that we have come across & implementing this type of solution really frees up Managers from manually assigning leads.

Lead Assignment Rules

Rule # Description
1

Auto assign a unique number to every Lead as it is created.

2

Equally distribute the new Leads to different Users.

North52 Decision Suite Solution

The North52 Decision Suite solution works with 2 formulas. One to generate an AutoNumber & the second one to do the lead assignment based on the AutoNumber. We use a Modulus function on the AutoNumber so it generates a whole number that we can then use to assign a Salesperson to the lead.

Formula 1

  • We create a formula of type 'AutoNumber' on the create of Lead records
  • This generates a Whole number for each lead record
  • Its value is placed into a custom field called 'Lead AutoNumber'

Formula 2

  • We create a formula of type 'Save - Perform Action' on the create of Lead records
  • It takes the total number of sales people involved (e.g. 4) & uses a Modulus calculation to get a whole number 
  • This whole is then used to assign sales people ownership of the lead

North52 Decision Suite Steps - Formula 1

  • Create a new formula of type 'AutoNumber'
  • Set the Event field to 'Create'
  • Set the Source entity to 'Lead'
  • Set the Target Property to 'Lead AutoNumber' 
  • Copy & paste the formula below (Formula 1) into the formula description field & click save

                                                                              

North52 Decision Suite Steps - Formula 2

  • Create a new formula of type 'Save - Perform Action'
  • Set the Event field to 'Create'
  • Set the Source entity to 'Lead'  
  • Copy & paste the formula below (formula 2) into the formula description field & click save
  • Note you will need to change the sales people names to match your sales people
  • You are ready to test

Formula 1 

AutoNumber([lead.leadautonumber] + 1)

Formula 2

SmartFlow(

   SetVar('RoundRobinNumber', ([lead.new_leadautonumber] % 4)), 
   SetVar('Owner',  Case( GetVar('RoundRobinNumber') ,

                             When(0), Then (  FindValue('systemuser',  'fullname',
                                                       'John Grace', 'systemuserid') ),
                             When(1), Then (  FindValue('systemuser', 'fullname',
                                                        'Bill Gates', 'systemuserid') ),
                             When(2), Then (  FindValue('systemuser', 'fullname',
                                                        'Melanie Williams', 'systemuserid') ),
                             When(3), Then (  FindValue('systemuser', 'fullname',
                                                        'Bruce Buxton', 'systemuserid') ),

                             Default('NoOp')
                         )
            ), 

   SmartFlowReturn(  UpdateRecord('lead',
                             lead.leadid],
                             SetAttributeLookup('ownerid', 'systemuser',  GetVar('Owner'))    
                          )
                 )
)

Wizard - AutoNumber

Please see below the wizard you can use to create the AutoNumber() function call used in this formula. 

Note to find the value for Input String, you will need to manually copy and paste from above.