Enhanced Email was released in Summer ’16 to open up email features that were previously only available in Email-to-Case (E2C).
Enhanced Email is automatically enabled for most organizations except those that use Email-to-Case. You can check this at Setup-> Enhanced Email
Let’s understand basic email-task first. In Salesforce, if you do not have E2C and Enhanced Email enabled, emails sent out are stored as tasks. This applies to all objects. Emails sent out from Case records begin to behave differently when you enable E2C.
Once you enable and set up E2C, 2 functionalities are introduced in emails related to Case records:
- An email service is created in Salesforce, which would receive emails from external sources and associate to Cases/Create new Cases.
- The emails that are sent out from Case records are shown as tasks in the Activity History related list, but open as EmailMessage records. The EmailMessage records have a prefix ‘02s’.
Enhanced Email in summary, is the 2nd point of Email-to-Case functionality applied to all objects on your Org.
One clear advantage of having the EmailMessage object is the ability to customize the object itself. If you go to Setup -> Email -> Email Message, you’ll see that you have the option of adding custom fields, triggers, buttons, validation rules e.t.c. to the EmailMessage object.
The ability to add custom fields to the EmailMessage records allows you to customize the object according to your own scenario. For e.g. suppose the first email that is sent to a customer needs to be marked. A simple checkbox and some trigger logic on Email Message object could achieve it.
Another thing to notice is that even if you create and add custom fields to the Email page layout, it’s visible only after the email is sent. When you send a new email ( analogous to creating a new record), only a certain set of fields are available in the UI. Once the email is sent and the email record is saved, you’ll be able to see your custom fields in the layout and edit them too. Standard fields aren’t editable.
After enabling Enhanced Email, all your objects have the EmailMessage object exposed to them and all Outbound Emails are stored as EmailMessage records. Each one of your EmailMessage records also have corresponding task records which can be found by querying the ActivityId field.
Other advantages of having Enhanced Email:
- Validation rules for Email messages.
- Trigger logic for any complex processing
- Page layouts for profiles.
- Custom buttons, links on the page.
All these features were previously only available when Email-to-Case was enabled and was only available for Case emails. With Enhanced email, this becomes available to all objects.
Check out the EmailMessageRelation object. It stores the relationship of the Contacts, Leads or Users who were Sender/Recipient in an EmailMessage.