Can I add CC/BCC addresses to Email Templates via Merge Fields in e2a?
Introduction
e2a already supported inclusion of CC/BCC addresses from the email template body but now this feature has been enhanced to include the CC/BCC recipients from certain target object fields specified in the Email Template using a specific syntax. This enhancement is available from e2a v3.4949 onwards.
Example: Let's say you have two fields on the Contact object to store CC Recipients and BCC Recipients. And, you have inserted these fields at the start of Email Template body using the syntax generated by Ortoo Email Template Assistant. It will result in inclusion of the addresses present in aforementioned fields on the e2a email client when this template gets loaded on the client.
Another extension of this functionality is to include CC/BCC recipients from a related record's fields via e2a functionality of related record merge fields resolution.
But, first we need to add 'Allow CC/BCC Recipients in Template' setting record under 'e2a Customer Settings' Custom Metadata Type.
How to enable Related Record Merge Fields resolution in e2a?
We need to create a Custom Metadata Type and add a setting record:
- Go to 'Setup' and type 'Custom Metadata Type' in the quick find box.
- Open the 'Custom Metadata Types' from the result and look for the metadata type i.e. e2a Customer Settings (If this setting is not already present, then this step can be ignored).
- Press on 'Manage Records' - an option residing on the left side of the metadata type.
- Press on 'New'.
- Enter the Name as: Allow_CC_BCC_Recipients_in_Template.
- Enter the Label as: Allow_CC_BCC_Recipients_in_Template.
- Enter the Value as: true
- Press 'Save'.
To add the assistant in any of the desired App:
- Go to "Setup" in quick find search for "App Manager" select the desired app and edit it
- In the App setting, go to "Utility Items" select add Utility item.
- Search for Ortoo Email Template Assistant.
- Label it 'Ortoo Email Template Assistant'.
- Press Save.
Now you can easily access the Ortoo Email Template Assistant over the desired app.
How to add CC/BCC Recipients via merge fields in the template?
- Open an Email Template in which you want to insert the merge fields containing the CC and BCC addresses.
- Now, open the Ortoo Email Template Assistant from this template's page.
- In the actions list, you will see these options as shown below.
- Select "Add a CC Recipient"
- Select the best option that suits you.:
- To add a field from the context object, select the appropriate field.
- Press Confirm Selection.
- Press Update Html Content
- Press Copy to Clipboard or Ctrl/Command + C, and now you can use it on the template, remember to paste these Text at the top/start of the template so the e2a email client can resolve it.
- Follow the same steps for adding BCC Recipients syntax using the above steps from 4 to 8.
- Now, loading this template on an e2a email client should result in population of CC and BCC fields on the client UI with the addresses which are present in these fields on the related object record/contact record.
Where can I manage this setting after it is created?
Once the setting is configured, you can manage it by navigating to Setup > Custom Metadata Types > e2a_Customer_Settings__mdt > Manage. Here, you can create, update, or delete records as needed.
Why use Custom Metadata Types for this setting?
Using Custom Metadata Types allows you to store and manage configuration settings at the application level. This approach provides flexibility and central control without requiring custom code, making it easier to maintain and update your settings across your Salesforce organization.
Is this approach recommended by Salesforce?
Yes, Salesforce recommends using Custom Metadata Types for settings like this. It provides a scalable and maintainable way to manage configurations within your Salesforce environment without modifying the underlying code.
Please contact us at support@ortooapps.com for any questions.
★★★★★ - EXCELLENT
★★★★☆ - GOOD
★★★☆☆ - OK
★★☆☆☆ - POOR
★☆☆☆☆ - RUBBISH