Email Service · Salesforce · Uncategorized

What is Enhanced Email ?

screen-shot-2016-12-08-at-10-51-14-am

Enhanced Email was released in Summer ’16 to open up email features that were previously only available in Email-to-Case (E2C).

Release Note

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:

  1. An email service is created in Salesforce, which would receive emails from external sources and associate to Cases/Create new Cases.
  2. 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:

  1. Validation rules for Email messages.
  2. Trigger logic for any complex processing
  3. Page layouts for profiles.
  4. 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.

Extra :
Check out the EmailMessageRelation object. It stores the relationship of the Contacts, Leads or Users who were Sender/Recipient in an EmailMessage.

Advertisements

3 thoughts on “What is Enhanced Email ?

  1. Nice write-up! Another nuance about Enhanced Email is that when enabled I don’t think the underlying Task behind it is available in Activity Reports. You have to use HTML Email Status report, and even then you don’t see the text/body of the email like you can see comments in a Task report.

    I like the power of Enhanced Email, but that reporting nuance has confused some people, especially when going into an org and not realizing what Enhanced Email is or that it was enabled.

    You can though still use Triggers on Task object with Enhanced Email enabled.

    Regarding EmailMessageRelation, although I’ve not worked with it directly, if it behaves like TaskRelation or TaskWhoRelation then those records may be created asynchronously by the platform. This means that Process Builder, Flow, Triggers, Test code won’t see those records until after a short delay. I had to work around that in a recent project where I wanted to update all Contacts related to a Task when Shared Contacts feature enabled: https://douglascayers.com/2016/12/26/how-to-update-leads-or-contacts-when-shared-activities-logged/

    Liked by 3 people

    1. Wow thanks for that comment Doug ! I never looked into the reporting implications of the Enhanced Email.

      I had a look at your blog and definitely need to check if EmailMessageRelation is created asynchronously. I have a feeling it works the same way. Will reply here as soon as i can confirm.

      Liked by 2 people

    2. Hey Doug!

      So I checked a couple of things (as a system admin).

      Checked list view of tasks in the Calendar view and also could see my email tasks there. But, yes you’re right.On drilldown to the task, I was taken to the email and not the underlying task record.

      Second, created report of type ‘Tasks and Events’, and could see my Email task records in the list. Interesting thing is that I was able to access the underlying task records directly from the report. When this kind of a Task opens, there’s a message right at the top.

      “This task appears to be associated with an Email Message. Click here to view the associated Email Message.”

      Also, EmailMessageRelation can be updated synchronously in process builder with the EmailMessage record creation, but it seems you can only update a single RelationId reference field. This stores the Sender and Recipient references to Contact, Lead or User. Don’t think this could be of any use to most people.

      Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s