Skip to main content
Deepu sfdc (TECH Mahindra) 님이 #Apex에 질문했습니다

Criteria :

  1. If the lead RecordType = ‘US Lead’, then assign the lead to users with country = ‘USA’
  2. If the lead RecordType = ‘International’, then assign the lead to users with Country != ‘USA’

The assignment has to happen in a round-robin fashion.

 

For eg., if there are only 3 users(User1,User2,User3) with country = ‘USA’ in the system then the first lead with RecordType = ‘US Lead’ will be assigned to User1, Second lead with RecordType = ‘US Lead’ will be assigned to User2 and so on.

The same logic applies to international leads.

 

Workload balance in lead assignment : It would be good if the workload of the user is considered in lead assignment. For eg., User2 is the next in line to get a lead assigned through round-robin fashion and he has 10 open leads and User3 only has 2 open leads assigned. Even though User2 is the next in line, in order to balance the workload of users, the lead can be assigned to user3.

 

 
답변 4개
  1. 2016년 9월 25일 오후 5:01
    Thanks Amit..

    Can you send me the code for that criteria ..