You need to sign in to do that
Don't have an account?
Yamini Bathula
Round robin Lead Assignment
Hi guys,
I have created a round robin lead assignment in salesforce using auto number and then a formula on it to divide the auto number with number of users. But it is not evenly disctributing among the sales people as exoected. I want the round robin to work only on a subset of leads but not all. Is there any way to achieve this?
I have created a round robin lead assignment in salesforce using auto number and then a formula on it to divide the auto number with number of users. But it is not evenly disctributing among the sales people as exoected. I want the round robin to work only on a subset of leads but not all. Is there any way to achieve this?
This may help you out,or else you can provide code snippet here,we will try to look at it.
Please try below links to achieve this .
https://gist.github.com/eskfung/f342b47ecc0849deb0cb
http://salesforce.stackexchange.com/questions/53235/lead-assignment-round-robin-based-on-lead-source
https://help.salesforce.com/articleView?id=000004000&type=1
Hope it will help you.
Instead of using the auto increment field, you need to write a trigger on Lead which will increment the number after checking the record type
And then use that custom field instead of auto number for mod function.
Trigger should be on insert and not on update.
Something like below -
trigger xyz on Lead(before insert) {
Id rtId= Schema.SObjectType.Lead.getRecordTypeInfosByName().get('Your Rec Type Name').getRecordTypeId();
Lead l = [Select customfield__c From Lead Where RecordTpeId =: rtId OrderBy customfield__c Limit 1 ]
Integer lastCount = l.customfield__c;
for(UrObject ob: Trigger.New) {
if(ob.RecordTpeId == rtId) {
lastCount = lastCount +1;
ob.numberField = lastCount;
}
}
}
There are many validation checks you need to put but this is just an overview of how it will look.
https://superroundrobin.com
https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FR4MkUAL