Email Templates in Salesforce to share the information among the organization employees



Email Templates: (Communication Templates)
==========================================
Email Templates are used to share the information among the organization employees / partners / end users / customers.
Salesforce has configured the email servers by default. So that no need to use any email servers explicitly.
To share the information among the users we need to prepare a Draft, Which contains the Email Subject and Email content(Body) by using "Email Templates". These are also called as "Communication Templates".
We can use the email Template in "Outbound Email Services", Which send's the email notifications from Salesforce to the external email id's.      
We can use the Email Templates, to share the information about

1. Regarding the New Products releasing into the market.
2. Regarding New Offers and discounts based on occasions.
3. Reminder alert to the user based on Case Creation / Escalation / Closed, etc.
  • While sending the email notification, we can make the content as static or we can make the content dynamic.
  • We can send the emails to one or more users.
  • Salesforce provides a set of readymade Email Templates, which are common to all the users in the salesforce organization.
  • We can create our email templates based on the need.
  • All the Email Templates will resides inside the "EmailTemplate" object.
  • Each Email Template should be resides in a Folder.
  • By default salesforce provides 2 email Template Folders.

Unfiled Public Email Templates Folder: It contains all the readymade email templates provided by salesforce.
This is a Public Folder. Which contains a set of email templates which can be visible to all users inside the organization.
My Personal Email Templates Folder: This is a Private Folder. Which can accessible by only the authenticated people.
This is a Private Folder. Which can accessible by only the authenticated people. We need to grant the access on this folder to the users. Then only they can access.

We can create out own personal folder, in-order to store your personal email templates.
We can list out all the email templates exist in the organization with the below navigation.

Click on "Setup" menu.
  • Goto "Administer" menu in Left Panel.
  • Goto "Communication Templates" link and expand it.
  • Click on "Email Templates" link.

Types of Email Templates:
-------------------------
Salesforce provides 4 types of Email Templates as below.
  1. Plain Text / Text
  2. HTML (Using Letterhead)
  3. Custom (Without using Letterhead)
  4. Visualforce Email Template.
1.Text / Plain Text: By using this template type, we can send the email notifications with the required subject and the content with "Plain Text" format.(i.e. Like White Background and Black Text).We can't include any images, pictures, colors, Hyperlinks, etc.

2.HTML (Using Letterhead):In this approach, we can place the content inside the Letterhead upon sending the email to the people, so that we  can make the email content look like attractive.

3.Custom (Without using Letterhead):In this approach, we can prepare the subject and the Content and can make it look like attractive with the help of "HTML programming".

4.Visualforce Email Template : By using this approach, we can prepare a visualforce page, through which can send the email notifications to one or more people.

We can query the email templates through programming as below.

   "Select id, name, description, templatetype from EmailTemplate"

Creating the Email Template:
---------------------------
Click on "Setup" menu.
1.Go to "Administer" menu in Left Panel.
2.Go to "Communication Templates" link and expand it.
3.Click on "Email Templates" link.
4.Go to the "EmailTemplates Section" and click on "New Template" button.
5.Select the Template Type from the options like Text / HTML / Custom / VF
6.Click on "Next" button.
7.Select the Email Template Folder from the Picklist, in which the email template should get resides.
8.Select the checkbox "Available for Use"
9.Enter the Email Template Name, and the Description.
10.Enter the Email Subject, which needs to be shared with the people.
11.Enter the Email Content , to be share with the people.
12.Click on "Save" button.

Real time Example:
=================
Create an Email Template to Notify the Contact person, upon creating a New Contact Record.

Email Subject: Congratulations ..!!  Your Contact Record has been created successfully.

Email Content: 

Dear Customer,
    Thanks for purchasing the products from our organization. From now on-wards you are a valuable customer to our organization.
We are pleased to inform you, that your Contact Record has been created in our database successfully for the future reference.

Thanks & Regards,
Sales Team,

Testing the Email Template:
---------------------------
We can test the email template as below...
  • Go to the Email Templates Link.Click on the Required Email Template Name.
  • Go to the "Email Template Details".Click on "Send Test and Verify Merge Fields" button.
  • Select the Record from the Lookup, in-order to include the selected record content inside the Email Template.
  • Enter the Preview Email ID in the Textbox, to notify the person.
  • Select the checkbox "Send a Preview To me".Click on "Ok" button.
Merge Fields:
=============
These are used to include the selected record content into the email template dynamically at runtime.

By using the merge fields, we can make the Email Subject and the Content dynamic.

Merge fields can be used in both Email Subject and the Content.

Syntax:
{!<ObjectName>.<FieldName / API Name> }
Ex:
{!Account.Name}
{!Account.Rating}
{!Account.Active__C}
{!Account.Pan_Number__c}
{!Account.Industry}
{!Position__C.Name}
{!Position__C.Location__C}
{!Position__C.Position_status__C}
{!User.FirstName}
{!USer.LastName}
...
...
Usecase:
--------
Create an Email Template, to Notify the Account Person, upon creating a New Account Record by including the Account Record Details inside the Email Template.

Subject:Congratulations {!Account.Name} ...!! Your Account record has been created successfully.

Content:

Dear {!Account.Name},

Thanks for purchasing the products from our organization. From now on-wards you are a valuable customer to our organization.
We are pleased to inform you, that your Account record has been created successfully.
Here are your Account details...:

Account Name   : {!Account.Name}
Rating Value   : {!Account.Rating}
Industry Value : {!Account.Industry}
Annual Revenue : {!Account.AnnualRevenue}
Account Type   : {!Account.Type}
Active Status  : {!Account.Active__C}
Billing Address: {!Account.BillingStreet},
                 {!Account.BillingCity},
 {!Account.BillingState},
 {!Account.BillingCountry},
 {!Account.BillingPostalCode}

Please contact on the below address, if any changes required.

Thanks & Regards,

{!User.FirstName} {!User.LastName},
Sales Team,
Testing the Email Template:
---------------------------
Goto the Newly prepared Email Template.
1. Open the Email Template
2. Click on "Send Test and Verify Merge Fields" button.
3. Select the Account Object Name in the "Picklist" field.
4. Select an Account record, by using the Lookup icon.
5. Select the checkbox "Send the Preview To me ".
6. Enter the Preview Email Address.
7. Click on "Ok" button.
Observation:
It should send an email notification to the specified email id, with the required subjec and the content, by including the selected Account record details inside the email template.
Assignment:
===========
1. Create an Email Template to notify the Hiring Manager, upon creating a New Hiring Manager Record, by using Merge Fields.

2. Create an Email Template, to notify the Lead Person, upon creating a New Lead Record, by including the "Lead Record details inside the email Template".

LetterHeads:
============
Salesforce allows to to prepare our own letter heads based on the need, with the required Header and Foote Logo's.

We can use this LetterHead, in-order to send the email notification to the user, which gives an attractive look and feel.

- We can have one or more LetterHeads in an organization.

- The Images required in the LetterHead, should be uploaded into "Documents" folder.

Goto Setup --> Goto "Administer" Menu
1. Click on "Communication Templates" link.
2. Click on "LetterHeads" link.
3. Click on "New" button, to create a New LetterHead.
4. Enter the LetterHead Name and Description.
5. Select the checkbox "Available for Use"
6. Click on "Next" button.
7. Select the Images and place into "Header and Footer" parts by using "Select Logo" button.
8. Change the LetterHead Background Properties by using "Edit Background Properties" button.
9. Click on "Save" button.
Note:
LetterHead can be used only in "HTML Email Templates". We can have one or more Letter Heads inside an organization.

HTML Type:
==========
By using the HTML Email Templates, we can send the email notification to the people with the required subject and the content along with the "Letter Head". 

Which makes the email content look like attractive.

Use case:
--------
Create an Email Template, to notify the Hiring Manager regarding the New Open Positions exist inside the organization. Send the Email notification along with the "Letter Head".

Subject:
Dear {!Position__c.HiringManager__c}...!! Alert Regarding the New Open Position : {!Position__C.Name} in the organization
Content:
Dear {!Position__c.HiringManager__c},
We are pleased to inform you, that we have few New Open Positions in the organization. Please recruite the Candidates ASAP.
Here are the Position Details...:
Position Reference ID : {!Position__c.Reference_ID__c}
Position Name : {!Position__c.Name}
Number of Positions : {!Position__c.Number_Of_Positions__c}
Location : {!Position__c.Location__c}
Position Status : {!Position__c.Position_Status__c}
Close Date : {!Position__c.Close_Date__c}
Maximum Budget : {!Position__c.Maximum_Budget__c}
Position Description : {!Position__c.Position_Description__c}
Skills Required : {!Position__c.Skills_Required__c}
Please recruite the Candidates for the above position before the Close Date : {!Position__C.Close_date__C}
Thanks & Regards,
{!User.FirstName} {!User.LastName},
Talent Acquisition Team,
Capgemini Inc.,
Toll Free : +1 (800) 345 - 5678
Email : careers@capgemini.com
Visit us : http://careers.Capgemini.com

Creating the HTML Type Email Template:
--------------------------------------

We have to use the below navigation to create the HTML Email Template (With Letter Head).

Goto Setup --> Goto "Administer" Menu --> Goto "Communication Templates"
1. Click on "Email Templates"
2. Click on "New" button to create a New Template
3. Select the Email Template Type as "HTML (With LetterHead)"
4. Select the LetterHead by using Picklist Field (Ex: Capgemini LetterHead)
5. Select the Form Layout (Ex: Free Form Layout)
6. Enter the Email Template Name and Label
7. Enter the Letter Description
8. Select the checkbox "Available for USe"
9. Select the Folder to save Email Template as "Unified Public Email Templates". 
This is a Public Folder, which contains all the Email Templates. This folder will be accessible to all the salesforce users.
10. Click on "Next" button.
11. Enter the Email Subject in subject field.
12. Enter the Email Content in the Content part of LetterHead.
13. Click on "Save" button.
Testing the Email Template:
---------------------------
1. Goto the Email Template and Open it.
2. Click on "Send Test and Verify Merge Fields Button"
3. Select the Object from the picklist : "Positions" and Select any Position Record
by using Lookup option.
4. Select the Checkbox "Send a Preview To" and Enter the CC Email Address
5. Click on "Send" button.

Custom Email Template: (Without Using LetterHead)
======================
By using this Template Type, we can prepare the email notifications to be send to the people with the required subject and the content.

We can make the content look like attractive, with the help of HTML programming.  We can use a set of HTML tags to make the content looklike attractive.

i.e. We can change the Font, Size, Style, Color, Hyperlinks, Formatting options (Bold, italic, underline), etc.
We can use the below HTML tags frequently inside the email template.
1. Bold Tag <b>: By using this tag, we can make the content to be displayed in Bold format.
Ex: <b> Content </b>
2. Italic Tag (<i>): This tag is used to display the specified content in Italic format / style.
Ex:<i> Content </i>
3. Underline (<u>):This tag is used to display the specified content with the underline style.
Ex:<u> content </i>
4. Break Tag <br/>:This tag is used to provide a line break in the content. i.e. we can move the cursor to the next line.
Ex:<br/>
5. Anchor Tag :(<a>): This tag is used to insert a Hyperlink inside the content. When the user click on the hyperlink, it will re-direct the user to the specified URL / Website.
Ex:<a href="Target URL" target="_blank / search / new"> Content </a>

Usecase:
--------
Create an email template, to notify the Candidate, upon submitting the Candidature Successfully to a position.

Subject:
Dear {!Candidate__C.Name} ..!! Your Candidature has been successfully submitted.
Content:
Dear <b> {!Candidate__C.name},</b> <br/><br/>
Thanks for showing the interest in our organization positions. <br/><br/>
We are pleased to inform you, that your candidature has been submitted successfully for the position : <b> {!Candidate__c.PositionName__c} </b> <br/><br/>
One of our HR person will contact you shortly, if your profile got shortlisted. <br/><br/>
Here are your Candidature details... <br/><br/>
Candidate ID : <b> {!Candidate__c.Candidate_ID__c} </b> <br/>
Candidate Name : {!Candidate__c.Name} <br/>
Location : {!Candidate__c.Location__C} <br/>
Notice Period : {!Candidate__C.notice_period__C} <br/>
Current CTC : {!Candidate__C.current_ctc__C} <br/>
Expected CTC : {!Candidate__C.expected_ctc__C} <br/>
Contact Number : {!Candidate__C.contact_number__C} <br/>
Email ID : {!Candidate__c.Email_id__C} <br/> <br/>
Please click on the below link, to see the Candidate Record
<a href={!Candidate__C.link} target="_blank"> Click Here To View Candidate </a> <br/><br/>
Please contact on the below address, if any queries. <br/><br/>
Thanks & Regards, <br/>
<i> {!USer.firstname} {!user.lastname}, </i> <br/>
Resource Management Group (RMG), <br/>
<b> Capgemini Consulting Inc., </b> <br/>
Testing the Email Template:
---------------------------
1.Go to the Email Template and Open it.
2.Click on "Send Test and Verify Merge Fields Button"
3.Select the Object from the picklist : "Candidate" and Select any Candidate Record by using Lookup option.
4.Select the Checkbox "Send a Preview To" and Enter the CC Email Address
5.Click on "Send" button.



Happy Coding Sharing Is caring. 😀😀😀


إرسال تعليق

Post a Comment (0)

أحدث أقدم