Solving the Spam Problem with Email to Case Premium for Salesforce

Spam is a major productivity problem everywhere, but in the contact center, you can’t treat it as aggressively and risk false-positives — losing a legitimate customer email would be very bad. Spam filtering at the email gateway is risky because email systems don’t have the benefit of your CRM data to cross-reference known contacts or accounts.

Most email and spam platforms can add spam indicators to the header of an email, which you can capture in Salesforce, and Salesforce Workflow can evaluate these headers and make decisions on how to treat the emails and resulting cases. For example, if your email or spam platform indicates (via a header added to the email) that it is confident an email is spam, you can vary the assignment / ownership, auto-response, or fields like priority.

In Salesforce, most records consume a “flat rate” of 2KB or in some cases 4KB of storage. The Email Message object is the only object for which the true byte count is considered. The problem with capturing email headers using Email to Case (standard) is that it is all or nothing, and they consume a ton of data storage which can quickly put you up against your data storage limit.

Doing the math

I took two emails from the same sender and compared the byte count when capturing all headers compared with just those that we need for Salesforce Workflow and the difference is remarkable. The select headers we need consumed just 156 bytes, while the full headers consumed 4,975 bytes. That’s roughly a 32X difference, or a savings of 97%. That equates to roughly 250MB of wasted data storage per 50,000 emails received.

Recovering precious data storage by purging headers is impossible because updates cannot be made to Email Message records unless they are in draft status.

Email to Case Premium provides a virtually perfect solution

Email to Case Premium makes it easy to define which headers to capture, thereby conserving data storage and allowing Salesforce Workflow to evaluate the email headers. For example, in Gmail, X-Gm-Spam: 1 indicates the email is a spam or phishing attempt. Received-SPF: fail is somewhat universal and often indicates that the sender spoofed their identity, which also suggests spam or phishing.

1. Check with your email administrator to determine what email header(s) your email or spam platform can add, and whether they are already added to email headers.

2. Configure Email to Case Premium to capture email headers.

Simply navigate to the Inbound Configuration page:

Inbound Configuration Page

3.  Create a Workflow Rule on the Email Message object. The example below applies to Gmail and includes a check on the resulting Case’s Account to prevent false positives.

Workflow Rule

After creating the Workflow Rule, add one or more of the following example field updates:

  • Change Owner to a Spam Queue (first set up the requisite queue)
  • Change the Case Status to Closed, or Closed (Spam) (first set up the requisite Case Status picklist values)

Going Further

  • Email to Case Premium’s auto-add contact feature can reduce false-positives by creating contacts and associating them with the right account, automatically. The example workflow (above) shows how to establish safeguards based on cross-referenced CRM data.
  • Consider scheduling a report to monitor cases processed by your spam workflow rule.
  • You can schedule batch apex to automatically delete cases x days after a point in time, like 30 days after the Case Close Date/Time to allow time to recover false positives.

July 7, 2014