Email to Case Spam

Share this article...

Dealing with spam in Email to Case can be a tricky one. Salesforce doesn’t really give any inherent way to deal with this, which basically means whatever gets forwarded to the Salesforce support email WILL end up as a case. This obviously isn’t ideal. As I detailed in my post 8 Essential Service Cloud Workflows this is just one way of many to deal with spam.

Most email servers provide some degree of spam filtering and in the most case will get rid of 80+% of it. The ones it doesn’t get rid of is the more believable direct spam emails you can get (Selling SEO services etc). The solution I came up with for a customer of mine was very simple and its seems to work for a few companies I have worked in.

The solution is this…If the customer does not exist inside of Salesforce – Move this case to a spam queue and close it. As this solution is so simple it is not going to work for everyone, as you may be receiving 100’s of cases a day and it might be a bit hard to get all these different contacts into Salesforce. This solution is suited to smaller support teams that are under a lot of demand. One prerequisite to this workflow is to have a Queue in place to move these spam cases to, if you are unfamiliar to this then check out this Salesforce article.

  • Click on Setup | Create | Workflows & Approvals | Workflow Rules
  • Click on New Rule
  • Select Case as the Workflow Object
  • Name your Rule and give it a description
  • Evaluation Criteria should be set as created
  • In the simple formula editor we can set the field as Case:Contact Email, Operator as equals and Value blank (e.g. if there is no contact email then no contact is attached).

Screen Shot 2014-04-06 at 11.25.17


To complete this workflow we need add two field update actions. One to close the case and one to move it to the case spam queue.

  • Add Workflow Action – New Field Update
  • Name the update and give it a description
  • Select Case Owner as the field to update
  • Then add the Case Owner as a Queue and the relevant Spam Queue you have previously created
  • Click Save and New
  • Repeat the steps above for this second workflow but add the Field to Update as Status and set the value as Closed

That’s it! You now have a simple spam filter that will make sure any contacts that are not registered inside your system are moved. Of course this will not work 100% of the time but in the cases where Salesforce does not have the most up to date email of a customer and it has been moved to spam in error, we can just take it out and add the contact. Easy!



2 thoughts on “Email to Case Spam

  1. I made a flow that checks new non-associated cases against a custom object, this contains a list of known known addresses I add from my email (flow exposed in gmail panel too), I have also blacklisted domains known to spam/offer SEO services. I am considering adding gmail, yahoo and to this list too! It does require us adding the emails in the first place, but we get a lot of emails from chinese suppliers, so lots of repeats.
    If I were to spend time updating it, I would have it record how many emails we receive from each address in order to determine if a domain is worth blocking and also have it mark emails that are similar ie [email protected] would be marked as likely spam if [email protected] was already marked spam.
    Shame Salesforce hasn’t bothered to do anything with this however…

Add Comment