We use Salesforce.com to manage our customer relationships and we’ve been happy with the application since we began using it in early 2007. Over the last year we’ve noticed a growing problem with lots of spam submissions from our Web-to-Lead forms creating bogus leads in our Salesforce.com instance.
How to Filter Out Spam Leads in Salesforce
To combat this problem, we wrote a simple validation rule that checks for a couple of very common spam techniques. If a new lead submitted via a Web-to-Lead form meets the validation rule conditions, the lead is not created and an email is sent to the regular recipients of leads with the lead information. If the lead is legitimate you can then manually create the lead in Salesforce.com.
To create a Salesforce.com validation rule to combat spam, use the following procedure. The rule simply checks to see if the first and last name are the same (assuming Sirhan Sirhan isn’t trying to contact you!) or if the first name, last name or description fields contain the string “http://”. That’s it and it works quite well. Give it a shot!
- Log into your Salesforce.com instance.
- Click your name in the upper-right corner and select Setup.
- Navigate to App Setup > Customize > Leads > Validation Rules.
- Click New to create a new validation rule.
- Set the Rule Name to Spam_Bots.
- Set the Error Condition Formula to the following:
FirstName == LastName
- Set the Error Message to something like “No go buddy! You’re a spammer!” and this text will appear in the email sent when a lead is not created.
- Set the Error Location to Top of Page.
- Save the Validation Rule.
- Test the rule by entering “spam-ish” data into your Web-to-Lead form. For example, enter “http://foo.bar” as the first name, last name or description. You should see that the lead is not created and that an email is sent with the lead information.