function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lalit Gupta 39Lalit Gupta 39 

Custom lead assignment

Hi Folks,

It's my first question in this community, hoping to get some answers on my first question. I was looking into lead assignment rules configuration but I can't figure out a way to validate user's eligibility before lead can be assigned to user agent. It seems like I have to use after trigger on  lead object to assign the leads to eligible agent based on some other criteria. Here is  my scenario. Lead needs to be assigned based on lead and agent territory and this part is easy. But agent should receive the lead only if agent meets some eligibility criteria like agent is licensed and appointed and agent is not OOO etc.

So is it possible to achieve it using lead assignment rules or do I have to write custom code using after trigger on lead object?

 
Jay GuruswamyJay Guruswamy
Hi,

In lead assigment rules, we can specify the conditions for the Lead fields and the User who is creating or editing the field. Not for user to whom it is to be assigned for.

I think writing a After Insert, After Update trigger is the way to go.


thanks
Jay