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
KavyaKavya 

Tracking emails sent via workflow email alerts

Hi,

 

I have Workflow setup in place which sends out Emails via Email Alerts.

Now the requirement is to track these Emails on a weekly basis either in the form of a report or using APEX Triggers.

Does anyone have any idea? 

Please provide your insights on this one.

 

 

Thanks

Kavya

wt35wt35

I do not think there is a way - even programatically - to track workflow email alerts.

This is the idea to promot:

https://success.salesforce.com/ideaView?id=08730000000BroKAAS

 

What you can do though is re-implement your business logic directly into Apex triggers and also send emails using the Single EmailMessage methods classes, for example:

 

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();   
        String[] toAddresses = new String[] {recipient.Email};
        mail.setToAddresses(toAddresses);
        mail.setBccSender(true);
        String[] bccAddresses = new String[] {person.Email};
        mail.setBccAddresses(bccAddresses);
        mail.setTargetObjectId(con.id);
        mail.setSaveAsActivity(true);
        mail.setSubject(subject);
        mail.setPlainTextBody(templateBody);
       Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});

 

Note the two lines in red, these methods specify that the email will be stored as activity and to which IDs it will be associated.

cplusplus_pleasecplusplus_please
Hi, which class are you using for Messaging?



=============================
Developer for www.voicent.com
Voicent provides CRM, auto dialer, predictive dialer, reminder, and call center solution that is suitable for anyone in any level
Voicent strives to meet customer demands to integrate Voicent software with CRM of their choice.
jay saijay sai
Hii kavya,

​If you want Track Emails result anytime and want to send bulk mass emails to make smart decisions for future campaigns.

Track opens, click-throughs, bounces, complaints, unsubscribes, and more.

This tracking of mails can be done by mass email service providers like Massmailer from salesforce app exchange.

For this, you might need to visit and look forward to this application.
http://support.massmailer.io/support/solutions/articles/16000006091-massmailer-developer-guide

For more details , you can visit the following url to learn more info and start a free trial 
                                                https://goo.gl/eVXBSG
Johnette Bishop 1Johnette Bishop 1
A simple solution to have a log of the email alerts: You can add a task (in addition to the email alert) to the workflow actions.  The task is set to Completed and the Subject describes the email that was sent.  You can't add the email details, but at least you have a record in Activity History when the related workflow was triggered.