I have a requirement whereby leads are imported, but due to a process, they can only handle 5 leads every 10 minutes (inserting a lead triggers an inbound call to an agent).
I have come up with the following solution.
- New leads are imported into a temporary custom object.
- I write an apex class to take the top 5 records from the custom object and insert them into the leads object then delete them from the custom object.
- I write a scheduled task to run the apex class once every 10 minutes during office hours.
Can anyone see any flaws in my solution?