How to deploy email template folders in Salesforce
Written by Eliza Pepper
Email templates can be a huge asset to your marketing, sales and support teams. You can set up formats for each department or specific campaigns, helping free up capacity and boost productivity. Email templates also help ensure consistency in tone of voice and branding across external communications.
To help your end users access the right email templates quickly, it’s useful to group templates into folders. For example, if you’re running a discount promotion on one of your products, you can put all the promotional email templates for this campaign together.
While email template folders help to streamline communication for your end users, managing versions and permissions can be tricky for admins. In this blog post, we’ll take a look at the common pitfalls when creating and deploying email template folders, and show you how Gearset helps you to deploy them with ease.
Common gotchas when creating email template folders
Any Salesforce team can take advantage of email template folders, as they’re available in both Salesforce Classic and Lightning Experience. But, Salesforce has separate processes to create folders in either Classic or Lightning. For example, you can’t change Classic template folders in the dedicated section for email templates and must make your changes in Setup.
The separation between Classic and Lightning template folders can cause hiccups when trying to share templates between the two Experiences and setting up your folder hierarchy.
Tips for deploying email template folders
There are also a few quirks when it comes to deploying email template folders, so here are our top tips to prepare for smooth deployments.
Check how you’ve set up your template folders before you deploy. For example, if you save Lightning Email Templates in the My private Email Templates space, you cannot deploy them via the Metadata API.
领英推荐
Permission sets configured by your admin can block your email template folder deployments. If you get the error message 'You don’t have the right to create Lightning pages of type EmailTemplatePage', you need to make sure that your admin has assigned you the relevant permissions on your profile.
You’ll also need to make sure you’ve enabled Lightning Email templates in your target org, or Salesforce won’t allow you to deploy your folder. Keep in mind that Lightning Email Template folders are only supported in first-generation managed packaging. This means you can’t use second-generation managed packages to deploy Lightning email template folders with SFDX.
It’s also easy to deploy your email template but miss out the relevant folder from the deployment package. When this happens, you’ll get the error message 'Cannot find the folder: folder_name'. To resolve this, make sure to include the email template folder in the package.xml file too.
How to deploy email template folders in Salesforce
When you’re ready to deploy your email template folders, you can use native Salesforce tools like SalesforceDX, Ant Migration Tool or Change Sets. Deploying email template folders isn’t directly supported by Salesforce’s Data Loader because this is used for data imports and exports, rather than metadata deployments.
Salesforce’s metadata deployment tools broadly follow the same process when deploying email template folders:
Even if you’ve gone through your deployment package with a fine-tooth comb, it’s still possible to hit frustrating errors when deploying your email template folder, and it’s often hard to spot what’s causing the issue. Thankfully, more advanced deployment tools like Gearset can work around common issues with email template folder deployments and catch issues before they cause the deployment to fail.
How to deploy email template folders with Gearset
This blog post was originally posted on gearset.com. Find out how how to deploy email template folders with Gearset in the rest of the blog post here: https://grst.co/3TMvv2p