2019 : How to find Email Statistics from Salesforce?

Querying HTML Email Status Object

Salesforce provides the ability to send email from the native interface using their Email Panel. They also provided the ability to track to a certain degree of the email sent via the HTML Email Status object.

The challenge here is that this particular object is not accessible from the Object Manager via the Setup.

Many administrator will wants to have the ability to configure and customise this object. Vote for this idea, https://success.salesforce.com/ideaView?id=08730000000ZzZUAA0

After some research, we found that there’s a workaround for this. I can’t take credit for this but its well documented in the stack exchange, see link below.

https://salesforce.stackexchange.com/questions/47779/show-html-email-status-under-account/48442#48442

You can query it from Apex level, which is the basic coding language of Salesforce.

An example:

Select Name, AccountId, (Select Id, EmailTemplateName From EmailStatuses) From Contact WHERE AccountId = ‘<Salesforce Object Id>’

Note that this EmailStatues object is only related to Leads, Contacts and Person Accounts.

Therefore if you are looking to have an aggregated summary of the email send via the account, you will have to run multiple statements (on leads, contact and person account).

Thanks for Reading

Enjoyed this post? Share it with your networks.

Leave a Feedback!