This article outlines how to create a simple welcome letter template for a contact.
In this step-by-step description, we will create a template that welcomes a new customer. This template will make use of the following features:
This guide is based on a sample template. To view the finished sample template, please see the attached document at the bottom of this article.
For a video version of this guide, please see the video below:
Step 1: Setting the base entity
When creating a template, it is always important to set your base entity first. This is because the fields displayed in the Template Designer will be determined by this base entity, and once a field has been inserted into a template, the base entity can no longer be changed. In this case, our base entity is Contact, so we will set the Type accordingly.
Step 2: Add your text
We will begin by adding the body of our letter. For this example, this is what our letter body looks like:
Note the location of the Xs. This is where we will insert our fields.
Step 3: Adding standard fields
Next, we will add some standard fields to our template. These standard fields will come from our base entity.
Some fields come from the base entity’s lookup fields. Lookup fields are located at the bottom of the fields list. These fields are N:1 relationships that are related to the current base entity. In our case, we need to get the Account Name field from Company Name (Account), and the First Name and Last Name fields from Owning User (User).
Step 4: Adding the date via Advanced String
We can add a date field through the Insert Field menu in the Template Designer. By selecting Advanced String under the Insert Computer Item submenu, we can access the Advanced String window and add the current date to our document by writing DATETIME() under Your Pattern for this property.
Step 5: Adding the total number of accounts via aggregation
To get the total number of accounts in our environment, we will need to take advantage of our aggregation feature. To do this, we need to open the Relationship Designer, set the existing relation to Separate entities, and enable the activate aggregation setting. Then, we need to select the Account Name attribute and aggregate by Count. This will give us the total number of accounts in our environment.
Then, we can insert the field from the fields list into the template. If prompted to insert the field as a table, select No, as we only want to include this as a field.
Step 6: Adding an email using the Hyperlink field
We can add a link to our email using the Hyperlink field. Similar to Advanced String, we can access this field through the Insert Field menu from the Template Designer. This time, under the Insert Computer Item submenu, we’ll select Hyperlink.
In the Hyperlink window, we can add a link to our email by entering the following:
Don’t forget to include a display name in the Displayname tab.
After clicking OK, this will add the field to the template.
Final step: The merged document
We have now inserted all the fields we need for our template. This is what the template looks like:
Once we save the template, we can merge it with a record within our system. The generated document should contain the data from our environment.
Here is our result:
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.