How to Create and Use Email Templates in Dynamics

   Words by CRM Consultancy

   on 26/04/2018 16:00:00

CRM Systems are often used to connect different departments or teams together, and a helpful tool for this is the ability to send Automatic Email Notifications from the system to a particular User or Users.

Often this can take the form of a key event that then triggers an Email Notification - so for example, we may send a new email to the New Business Team when a new Customer Account is created.

However to do any of this we send a format for that Email Notification, and this is where Email Templates come into play.

An Email Template allows us to define exactly how am Email Notification will appear to the Recipients.

So we often need to create a group of Templates with any new CRM Project, and then train the end users to maintain and change these templates.

To do this in CRM, we must first open our Customisations area and our End Solution - from here we can see a sub-section past the main Entities Section for Templates:

A1

If we navigate into this section, we can then see a list of all of the Email Templates in our current CRM System - this will generally be blank initially.

So to create a new Template, we simply click the New button.

Initially this will give us a screen that asks us which Entity or Screen in CRM we want to produce the Email from - this helps the user pick the right Email Template for the right type of record in CRM. In our example, we can pick the Opportunity Entity.

A2

This will then give us a screen that allows us to define the details of our Template:

Name - How the Template will appear to the user when selecting which Template to use.

Description - What or when should the Template be used, this then helps the user to select the right template for their Email or Workflow.

Subject - The Subject that will be given to any Emails created from this Template.

Body - The main Body Text for any Emails created from this Template.

A5_EmailTemplateScreen

Here we can control our Email Template to get the Wording and Appearance correct.

There are main areas here for us to examine.

Formatting

The Body of the Template allows us to insert different Fonts, Styles (bold, italic and so on) and even Tables.

The editor here gives some options but often it can be easier to build the Template in Microsoft Word and then copy and paste into the Body field for our Email Template. This gives us a greater degree of control over how the Template will appear.

(Essentially when working with Microsoft Word or Email Templates, our work is being saved as HTML that describes the formatting as well as the text. HTML is the 'mark-up' language used by Webpages to control the appearance of that Webpage, and is also used for Emails from CRM, Outlook and other Email Providers)

A6_EmailTemplateWithContent

Dynamic Field 'Slugs'

This is the main area for our Email Template - 'Slugs' allow us to insert a Merge Field into our Email Template that will then pull a certain field from CRM into our Email Template.

For example, this allows us to insert <First Name> or <Last Name> into our Template as way of addressing the Email to a certain Recipient. So we could have:

A4_FirstNameLastName

As an improvement over a stock:

A4_ToWhomItMayConcern

We can insert a Slug by clicking the Insert/Update icon on the Email Template screen:

A6_InsertSlog (1)

This will open the Insert Slug screen, from here we can click the Insert option to find the field we want for our Slug:

A6_PickSlugField

This will then allow us to select which Entity and Field from CRM we will use for our Slug.

Remember when we first picked the Entity that our Template will run for? This is where this comes into play - the screen will initially allow us to insert any field from this Entity for our Slug. So if our Template is regarding the Opportunity Entity, then we will see the list of Opportunity Fields for the Template - whereas if our Template is regarding a Prospect, then the list of Prospect fields.

Once done, we can click Okay to take us back to the initial Insert Slug screen.

A7_DataFieldEditor_Populated

Here we can then finish our Slug by specifying a value in the bottom Textbox - this is the value that will be used if our selected field in CRM is blank, and so acts as a 'catch' to help improve the formatting of the Email. Often this is set to 'No Name' or 'Blank Value' as a simple indicator that the field is blank.

We can then click OK to finish adding the Slug to our Email, we can then add however many Slugs we might need in our Template:

Emails_with_Slugs

And if we need to edit an existing Slug, we can simply highlight with the Mouse or Text Cursor and click the Insert/Update Slug icon again - as long as we have our Slug selected, then CRM will know to edit the existing Slug rather than Insert a new one.

With Slugs we can build rich formatted Emails that can be used in CRM for either Manual Emails or (more commonly) Automated Workflow Rules.

Testing our Template

When we have finished designing our Template, we can click Save and Close (no publish here for Templates) and then browse into CRM to send a new Email.

The best for us to do this is to find a record in CRM of the Entity that we setup the Template for - so an Opportunity record. We can do this by searching for a particular Opportunity in the Opportunities area of CRM, or by using a link to an existing Opportunity in the system such as this one.

When we have our Opportunity in front of us, we can then add an Email to the Opportunity by clicking the Activities area, then the … icon, and finally Email.

A8_EmailWithNewSlugsAplenty (2)

This will then open the New Email screen in CRM where we can specify the usual details for an Email: to, from, cc and so on.

A9_Email (1)

We are interested in the Body of the Email, where we can see a toolbar of options. Most of these options are connected to Formatting and appear similar to the Editor we saw for the Template - however we have one key option for 'Insert Email Template'.

This allows us to use a particular Template for our Email, and so clicking this will allow us to pick a template which will then format our Email accordingly.

The first screen here allows us to select which record we want to use to merge into our Template, so our first step is to select the Opportunity rather than the User record:

A10_Template_SelectRecord

Then for our example, we want to use the Template we created earlier.

A10_Template_SelectTemplate

This will then populate the Subject and Body of the new Email based on our Template - translating any Slugs into real data pulled from the Opportunity record in CRM.

A11_Email

With this done, we are pretty much ready to send the Email so we can see how this will be received - before we do however, CRM will have defaulted the TO recipient to being the Potential Customer of the Opportunity (as we created the Email from this screen in CRM), and we may to change this to our Email Address.

To do this, we simply click on the TO field and press Delete to remove the existing value - and then type our Email Address into the TO field. CRM will then find the corresponding record in CRM for our Email Address and resolve to send to that Email Address.

We can then click Send and fire the email off from CRM to our Email Inbox.

This lets us evaluate our Template and how Emails created using this Template will appear when received.

The next step being to start thinking about how we configure these Emails to be sent automatically from CRM, rather than being added manually.

The above description of creating and using an Email Template in Dynamics is using the standard ‘out-of-the-box’ functionality, our next guide here will look at how this process can be improved by using Xperido to build and send Emails using the advanced Template Generation options that the Xperido App for Dynamics provides for us.