How to determine where an email template is being used?

  1. URL hack the "show dependencies" button available for example on Apex classes. https://instance.salesforce.com/packaging/dependencyPage.apexp?id=... - you can paste class id, page id, email template id... Good for initial reconnaissance. Probably you can achieve similar results while building a fake changeset and clicking show/add dependencies. It's not a 100% solution though.
  2. Try to delete it in sandbox and watch the fireworks ;)
  3. If delete has finished successfully - run all tests?

Seriously.

Static analysis (workflows email alerts listview, Eclipse search etc) will get you only so far. Templates can be referenced via Name, DeveloperName, Id and even if you'd cover all of these it's still not 100% foolproof as I've seen template Ids stored within custom settings or labels...

In the end - you know your codebase best :/


If you only want to check Workflow Rules' Email Alerts, you can create a new view in

Setup --> Create --> Workflow & Approvals --> Email Alerts

with Email Template Name equals Value.

However, as aforementioned, the assumption is that Email Templates are only used in Workflow Rules' Email Alerts. Moreover, you have to create separate views for each Email Template you want to track.


You can use Salesforce Happy Soup, which provides 100% free Salesforce Impact Analysis. Happy Soup will tell you which email alerts are using your template, as well as which apex classes are using SOQL against the EmailTemplate object.

happysoup.io

PS: I'm the creator/owner of happysoup.io and I'm not trying to sell you anything. As stated above happy soup is FREE