Lead Assignment Process
Overview
The goal is to automate the assignment of leads among agents based on priority levels, ensuring that each agent receives a maximum of 30 leads per day distributed as follows:
8 leads with Priority P1
10 leads with Priority P2
12 leads with Priority P3
This assignment will occur daily for a potentially large set of leads (It might be 1000+ or something, we dont need the lead count or when it created or updated ).
Hello @Hemanth Sunkara,
To automate lead assignment based on priority levels in Salesforce, follow these steps:
- Create Custom Fields: Add a "Priority" field to your Lead object with values P1, P2, and P3.
- Create Assignment Rules: Use lead assignment rules to define how leads are assigned based on priority.
- Use Apex for Automation: Write an Apex batch class that runs daily. This class should:
- Query leads by priority.
- Count assigned leads for each agent.
- Assign new leads while ensuring no agent exceeds their daily limit (8 for P1, 10 for P2, 12 for P3).
- Schedule the Batch Job: Use the Salesforce scheduler to run your batch class daily.
Regards
Sunny Patwa
