function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Steve Myers 6Steve Myers 6 

Custom Email Tracking for VF emails

Hello. I am trying to get a custom email tracking solution work for Visualforce Email templates sent from flows, firing on a contact record. We have 'enhanced email tracking' enabled in our org.

We have managed to create an EmailMessage record and set up an EmailMessageRelation with a contact. The EmailMessage record shows up on the contact activity timeline as expected and the email tracking shows up as 'Unopened'. However, further email opens are not being tracked/getting updated on the EmailMessage record.

Note: the 'MessageIdentifier' isn't set up on the EmailMessage record. I am not sure if this is causing the email tracking issue. Any pointers on the email tracking would be much appreciated.

Thanks!
ShivankurShivankur (Salesforce Developers) 
Hi Steve,

Please check out the considerations for using email tracking, so that you could think of or design of achieving your requirement posted above:
https://help.salesforce.com/s/articleView?id=sf.inbox_setup_tracking_considerations.htm&type=5

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.