banner



Can I Set A Default Email Template For Salesforce Emails Sent From Contact Record

Veuillez noter que ce billet est présentement disponible uniquement en anglais.

Email templates provide a variety of benefits. Upfront work to create professional-looking templates will save time in the long run. Also, because multiple users can have access to templates branding guidelines can be better adhered to and messaging consistent across business units.

What email template should you choose?

Salesforce provides 4 email template types. Here's an overview of the different types and some considerations.

1. Text Email Templates

This template only contains text, no formatting is possible (e.g. font color, font size, bold…)

Salesforce Email Template Text Email Example

You can use this type of email template when manually sending an email (manually clicking "Send an Email" from the Activity History related list). With this option, you can change the formatting and also modify the content.

2. HTML (Using Letterhead) Email Templates

You will need to create a Letterhead, which is the visual container of the email. You also need to select an email Layout. This specifies how the content is distributed. The email formatting can be done using the Formatting Controls, no HTML/CSS knowledge needed. This can result in a professional-looking email.

You can use this email template when manually sending an email. With this option, you can change the formatting and also modify the content.

Salesforce HTML using letterhead email template example

3. Custom (without using Letterhead)

No letterhead needed, but you will need to build your own HTML and CSS  to customize the email layout and formatting.

 In the picture below, no HTML or CSS has been used. Therefore, there is no formatting.

Salesforce Custom Email Template (without using Letterhead) example

You will be able to re-use the email template when manually sending an email, but you won't be able to modify the layout or the content of the email.

4. Visualforce

You need HTML, CSS, and Apex knowledge if you want to use this template. Visualforce templates allow you to have access to information from other records instead of just being limited to the information on the current record. You can also specify a "Reply-to" address. You can re-use this email template when manually sending an email, but you won't be able to modify the layout or the content of the email.

For example, this code must be entered in the user interface to display the email message and related fields.

Salesforce Email Template using Visualforce example

Tips and tricks

Custom date formatting

Salesforce uses the system's location settings to format the date. However, most organizations like to display dates in different formats. You can use formulas to customize the date format.

e.g. If you need to format the date like this Month DD, YYYY. Here's the formula you need, where Record.DateField is your date field.

{!CASE(MONTH(Record.DateField),1,"January",2,"February",3,"March",4,"April",5,"May",6,"June",7,"July",8,"August",9,"September",10,"October",11,"November",12,"December","Month")} {!DAY(Record.DateField)}, {!YEAR(Record.DateField)}

Display information from other records

You have 3 options to achieve this:

  • Use a Visualforce template. As mentioned previously, you need to create your own CSS, HTML.
  • Send your email by trigger. From a trigger, you can choose an email template and update the content to add information from other records before you send the email.
  • Add a Text Area field on the record and populate its content with the information from the other records. e.g. A trigger on Opportunity Lines updates a Text Area field on the parent Opportunity to include the Product name, quantity, and amount. Then simply add that Text Area field on the email template.

Add record link

There is a Merge Field value you can use to add the current record link: {!Account.Link}. However, the recipient will see something like this: "https://na17.salesforce.com/001o00000031ABP."

If you want to customize the text the recipient sees, you will need a HYPERLINK() function inside a formula field: HYPERLINK('/' & Id, 'Click here to view record')

If you are using an HTML template, you can also enter the text you want to display on the email template, click on the "Insert a Link" icon, and set the link Merge Field value on the pop-up window.

The end result will be: Click here to view the record.

Attach email sent to record

Emails sent by workflow don't appear on the Activity History related list, like the emails sent manually do. A workaround is to use the Email To Salesforce functionality.

Email to Salesforce lets you attach emails to Salesforce Objects by sending the email to an email address auto-generated by Salesforce.

If you add that generated address on the "Additional Address" field of the email alert, the email will be attached to the contact / lead that the email was sent to.

Additionally, if you want to attach the email to a record other than a contact or a lead, you must add this to the email body or subject: ref: RECORD_ID. e.g. You want to attach the email to a custom object with id a0v170000004CFu, you will need to add ref: a0v170000004CFu on your email body.

Can I Set A Default Email Template For Salesforce Emails Sent From Contact Record

Source: https://bigbang360.com/salesforce-email-templates/

Posted by: baileybarriver.blogspot.com

0 Response to "Can I Set A Default Email Template For Salesforce Emails Sent From Contact Record"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel