+ Start a Discussion
Amrit Singh 27Amrit Singh 27 

Automatically Delete Leads based on an email pattern

We have deployed an automatic lead generation tool to create leads for checking website downtime. The leads are created with a random email address that begins with "ghostinspector+XXXXX@yahoo.com".
How can I create some sort of a trigger to automatically delete those records because they are increasing our leads counts and conversion rates.
I have read something about apex triggers, but have no idea how to do it. Can you guide to the right direction. We use Salesforce classic if that matters.
AbhishekAbhishek (Salesforce Developers) 
The feature you are requesting is still in Idea Face,


For further reference, you can check this too,


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.


Hi Amrit, 

I would just add a validation rule that will not let the lead to be created in first place. 

And getting a custom validation exception would still mean that your automatic lead generation went through and website is not down.