How to Mass Change Email Templates Folder with Salesforce Data Loader

In the Salesforce CRM, Email templates play a crucial role in maintaining consistency and efficiency in communication. However, according to the evolving business, the requirements for email templates also change.

Salesforce Data Loader can be used when it is required to make mass changes to your email templates folder, like bulk migrating an email template from one folder to another.

This Salesforce tutorial will teach us to Mass Change Email Templates Folder with Salesforce Data Loader. This change or modification is available for Salesforce Classic Email Templates only.

Mass Change Email Templates Folder with Salesforce Data Loader

In the below steps, I will explain the Mass change templates folder with the data loader with the help of an example where I’ll transfer the email templates from one folder to another.

In this mass data change, we will first run a data export to get the required fields like IDs, and then we will run an update operation to make the change in the data.

Obtain the IDs of template folders and IDs of the email templates

1. First, we need to obtain the ID of the folders that currently contain the email template and the ID of the folder in which you will transfer the email templates, and for that, follow the steps:

  • Navigate to the Setup tab.
  • Type Email Templates into the Quick Find box and click Classic Email Templates.
  • Choose the folder from the Folder dropdown in the templates setup.
  • After you’ve selected the folder, the URL for the page will reflect the folder ID. For example, 00l5i00000AkFE.
Mass Change Email Templates Folder with Salesforce Data Loader

2. Now, we will export the IDs of email templates with the Salesforce data loader, and for that, log in to the data loader and click on the Export button.

See also  How to Import Order Products with Data Loader in Salesforce

3. In this step, activate the checkbox Show all Salesforce objects and select the data object Email Template. After this, select the location to save the CSV file and click on the Next button.

Use data loader to mass update email templates

4. In this window, select the query fields Id and FolderId. Now, under the heading ‘Create the where clauses to your query below,’ create a query that chooses the temples from a specific folder.

The condition will be like this: ‘Fields‘ is ‘FolderID‘, ‘Operation‘ is ‘equals’, and ‘Value‘ is ‘00l5i00000AkFE‘.

After this, click on the Add Condition button, and as a result, the generated query will look like this: ‘Select Id, FolderId FROM EmailTemplate WHERE FolderId = ‘00l5i00000AkFE‘.

At last, click on Finish.

Mass Change Email Templates Folder via Salesforce data loader

5. Now open the extracted CSV file in an external source and replace the current FolderID with the FolderID of the folder in which you have to transfer these email templates.

Then save the CSV file in your system from where it can be accessed by the Salesforce data loader.

Change Email templates folder via Salesforce data loader

Now, this CSV file will used in the further steps to update and change the folder of email templates with the help of the data loader.

Update the templates folder using the Salesforce Data Loader

To update or change the templates folded using the Salesforce data loader, open the Data loader and follow the below steps.

1. In the data loader, log in with your credentials and click on the Update button.

Update the templates folder using the Salesforce Data Loader

2. In this step, click on Show all Salesforce objects, then select the object Email Template. Now select the CSV file that we exported and modified in the above steps, after this click on the Next button.

Mass select Salesforce email templates to move into different folders

3. Now the data loader will initialize the uploaded CSV file. Here, click on the OK button.

See also  How to Deactivate Standard Products in a Standard Price Book via Data Loader in Salesforce

4. In this step, we will map the column header with the object field name, and for that, click on the button Create or Edit a Map. Then in the Mapping Dialog window, click on the button Auto-Match Fields to Columns, this will auto-match header columns to field names.

After mapping, click on the OK button, then click the Next button.

Moving Documents and Email Templates in Folders with Salesforce data loader

5. In this step, select the location for the success and error files from where they can be accessed later. At last, click on the Finish button.

Salesforce data loader to change the folder Email templates

6. In the warning message, click on the Yes button to proceed.

Use data loader to change the folders of mass email templates

7. Now, the data update operation will start, and after its completion, a dialog box will display the number of errors and successes that occurred in the data update operation.

In this case, we got successes with zero errors which means the data is updated and email templates are transferred to the other template folder.

At last, click on the OK button to close the Data loader.

Mass Change Email Templates Folder using Salesforce data loader

To view the email templates, open the Salesforce developer console, then on the setup page, search Email Templates in the Quick Find box and select Classic Email Templates.

In this window, select the folder from the Folder dropdown in which you have transferred the email templates.

How to Mass Change Email Templates Folder using Salesforce data loader

Now we can see that in the above image, email templates are successfully transferred to the other folder.

In this way, we can mass change the email templates folder with the Salesforce Data Loader by following the above steps.

See also  How to Insert or Update Price Books with Data Loader in Salesforce

Conclusion

In Salesforce, Data Loader provides a robust solution for managing and making mass changes to your email templates folder efficiently.

By following the above steps, you might have understood the process of mass changing email templates folder with the Salesforce data loader. Now, you will be able to manage the email templates in your organization.

You may like to read: