Updating Owner Full Name
By following these steps, you will be able to simultaneously convert all of your templates to use the first and last name merges separately:
Install Data Loader
We will be taking advantage of the Salesforce Data Loader to complete this update. Salesforce provides this tool to Salesforce admins for simple data import/export. If you do not have Data Loader please follow the steps for Installing the Data Loader. A full guide on Data Loader can be found here.
Export Template Data
- Open Data Loader.
- Click Export.
- Log in using either your Salesforce login and password + token, or by using oath authentication.
- Click Show all Salesforce objects and select Emailtemplate.
- Click Browse to choose a location to save the export file and name it: fullnametemplate.csv.
- When asked what to export, copy the following query and paste it into the lower box:
Select Id, Subject, HtmlValue, Body FROM EmailTemplate where isactive = true
- Click Finish to export all email templates and return to the Main Menu.
- Repeat these steps for Rule Action creating file fullnameruleaction.csv and using query:
Select Id, TargetX_Base__HTML_content__c, TargetX_Base__Text_Content__c FROM TargetX_Base__Rule_Action__c
- Repeat these steps for Configuration creating file fullnameconfiguration.csv and using query:
Select Id, TargetX_Base__HTML_content__c, TargetX_Base__Text_Content__c FROM TargetX_Base__Rule_Action__c
Update Owner Full Name
- Open the file fullnametemplate.csv using Notepad or Excel.
- Do a search/replace to find {!Contact.OwnerFullName} and replace it with {!Contact.OwnerFirstName} {!Contact.OwnerLastName}
- Save the file and keep it in the original csv format.
- Repeat this for fullnameruleaction.csv and fullnameconfiguration.csv; note that this can be skipped for each empty file.
Import Updated Templates
- Open Data Loader.
- Click Update.
- Log into using either your Salesforce login and password + token, or by using oath authentication.
- Click Show all Salesforce objects and select Emailtemplate.
- Select the file fullnametemplate.csv as the import file.
- When asked about creating a map, select Create or Edit a Map followed by Auto-Match Fields to Columns.
- Verify that all fields are mapped and that the names in both columns match.
- Click Update.
- Repeat this for fullnameruleaction.csv on the Rule Action object and fullnameconfiguration.csv on the Configuration object, skipping this if the files are empty.