My Account | Internet Creations
Welcome, Guest.

Control spam, automated, and mass emails in E2CP using saved Inbound Email Headers

Summary

Within Email to Case Premium, Admins can enter a list of keywords to specify which email headers on inbound messages should be stored on the related Email Message object. Saving these headers can be helpful to avoid spam and out-of-office emails from interfering with your organization's intended use of E2CP. Instead of consuming storage space by saving every header, this feature allows admins to preserve only those that are necessary to build workflow and automation as needed. This article provides two sample Workflow Rules with Field Updates for use with inbound email headers.

Details

In the examples below, we will use the values entered in the Save Inbound Email Headers setting from within the Email to Case Premium setup wizard to create useful workflow automation on the Email Message object.
 
A few helpful email headers
X-Autoreply: yes (some sort of automated email like an Out of Office message)
Precedence: bulk (some sort of mass email, or possibly a transactional survey)
Received-SPF: fail (might indicate spam)
 
User-added image

When used in coordination with the Email Distribution feature (a premium add-on to E2CP via an extension package) and our application Case Flags, saved email headers can be used for a variety of purposes and actions. Below are two common examples.

Example A
Saved email headers can be used to distinguish an inbound Out of Office reply from the Case Owner, and prevent that email from clearing the flag on the Case. In the workflow rule below, we will ensure that any email from the Case Owner, except an Out of Office reply, should clear the flag.
 
1. Create the Workflow Rule
  • Navigate to Setup | Create | Workflow & Approvals | Workflow Rules  and click New Rule.
  • Select Email Message as the object, and click Next.
User-added image
  • Enter "Email from Case Owner" as the Rule Name.
  • Enter a description. We recommend: "Checks for an inbound email from the Case Owner that is not an Out of Office reply. When used with Email Distribution, the Case Flag should be cleared."
  • Select Created as the Evaluation Criteria.
  • And Run this rule if the following formula evaluates to true.
  • Enter the following syntax as shown below:
AND( 
Incoming = True,
Parent.Owner:User.Email = FromAddress ,
NOT( CONTAINS( Headers , 'X-Autoreply: yes') )
)
User-added image
 
  • Click Save & Next.
2. Create the Clear Flag Field Update
  • In the Add Workflow Action picklist, select New Field Update.
User-added image
  • Add a Name and tab down to populate the Unique Name. We suggest "Clear Flag"
  • Enter a Description to help identify the purpose of the field update.
  • Select Case and Case Flag Date/Time as the field to update.
  • Select the first radio button within Date Options for A blank value (null).
User-added image
  • Click Save, and then click Done.
  • Click the Activate button to make your rule active.
User-added image


Example B
Build and activate the rule below to avoid Spam and Phishing attempts, thus changing the owner of the Case to a Spam Queue and clearing the Case Flag. In this example we will cover Gmail specifically, though a similar approach will likely work with most email platforms and spam filters.
 
1. Your Gmail Administrator must "Add X-Gm-Spam header and X-Gm-Phishy header" as advised in the following support article: https://support.google.com/a/answer/2368151
 
2. In the General Settings section of the Inbound Configuration within the Email to Case Premium setup wizard, enter "X-Gm-Spam" as shown below, and click Quick Save at the bottom of the page.

User-added image

3. If you do not already have one, create a Spam Queue to route spam and phishing attempts.
  • Navigate to Setup | Manage Users | Queues and select New.
  • Configure the Queue Name, Email Address, Supported Objects, and Queue Members according to your organization's preferences.
  • Click Save.
4. Create the Workflow Rule
  • Navigate to Setup | Create | Workflow & Approvals | Workflow Rules  and click New Rule.
  • Select Email Message as the object, and click Next.
User-added image
  • Enter "Gmail Indicates Spam or Phishy" as the Rule Name.
  • Enter a description. We recommend: "Checks for Gmail Spam (and Phishing) header. See https://support.google.com/a/answer/2368151 for details."
  • Select Created as the Evaluation Criteria.
  • And Run this rule if the following formula evaluates to true.
  • Enter the following syntax as shown below:
AND(
CONTAINS(Headers, 'X-Gm-Spam: 1'),
NOT(ISPICKVAL( Parent.Account.Type , 'Customer')),
NOT(ISPICKVAL( Parent.Account.Type , 'Prospect'))
)
User-added image
  • Click Save & Next.
5. Create Field Update to Disable Email Distribution
  • In the Add Workflow Action picklist, select New Field Update.
User-added image
  • Add a Name and tab down to populate the Unique Name. We suggest "Disable Email Distribution"
  • Enter a Description to help identify the purpose of the field update.
  • Select Case and Disable Email Distribution as the field to update.
  • Select True as the Checkbox Option.
  • Click Save & New.
User-added image
 
6. Create Field Update to Change Owner to Spam Queue
  • Add a Name and tab down to populate the Unique Name. We suggest "Change Owner to Spam Queue"
  • Enter a Description to help identify the purpose of the field update.
  • Select Case and Case Owner as the field to update.
  • For Case Owner, use the picklist to select Queue, and use the lookup feature to select your organization's designated Spam Queue.
  • Click Save. 
User-added image
 
7. Add the Field Update for Clear Flag  
  • In the Add Workflow Action picklist, click Select Existing Actions.
User-added image
  • Move the available action Field Update: Clear Flag to the Selected Actions section using the Add arrow button.
User-added image
  • Click Save, and then click Done.
  • Click the Activate button to make your rule active.
User-added image

 
Please note: This KB article is provided as-is and customization using Workflow Rules is not supported.
For further assistance, please contact your Salesforce administrator, Salesforce implementation partner, or your Internet Creations Account Executive to inquire about professional services.  

Support

Open a Case