This lesson will show you how to create an email template within AgileCase using the Mustache configuration technique.
Access the email templates page
You can create email templates in AgileCase in a manner very similar to document templates but using a slightly different configuration technique known as Mustache.
The first step in creating an email template is to click the "Email" button under "Templates" on the settings menu.
Add a new template
On this page you can view the AgileCase example template as well as any that you have created. To create a new template, click "Add Email Template" .
Create your template using the form
You will now be presented with a blank email template that you can fill out using Mustache mergefields to pull data from your cases.
Mustache fields follow the same structure as Mail Merge fields with a full stop indicating that the following element should be looked for in the previous area, for example
Client.Email would populate the field with the email address listed under the case client.
The main difference between Mustache and Mail Merge fields is that Mustache fields must be contained in double curly brackets in the format
field content. In this example you can see how Mustache fields can be used to automatically fill out address details.
Probably the most common use of Mustache fields in this context is to put
Client.Email in the "To" field. This will automatically list the client's email address as recipient when the template is selected. However this is not their only use, as you can see the field
CurrentUserEmail has been used to BCC in the user that sends an email of this type.
Fill in the body of text
You can now fill in the body of text using Mustache fields to populate the data in exactly the same way as you did with address details.
Here you will likely use more complicated fields such as
Milestone.Initialclientmeeting.Actual, which will pull the actual date of the first meeting with the client, found under milestones. Another example is
Milestone.SecondMeeting.Expected which will pull out the expected date of the second client meeting.
In order to find these more complex fields, or confirm the format of any others, you can use the merge field helper to see a list of fields. The next step will briefly cover this or you can read about it in more detail in this lesson.
Merge field helper
The merge field helper for a case will list all of the fields that can be used with Mail Merge or Mustache.
Each element here can be inserted into a document or email template using the appropriate configuration technique. The merge field helper works as a reference book for you mergefields which you can consult if you are having trouble finding a certain element.
In order to access the merge field helper, click the arrow beside the "Edit" button on a case page and select "View Merge Fields" from the dropdown.
Choose available case types and save
With your template complete you can set which case types it will be available in and apply any appropriate labels. With that done, click "Save Changes" to create the template.
Using your email template
To create an email using your template, go to the "Docs & Comms" tab in a case, click the "New" button and selecte "Create Email". This will bring up a window that will allow you to compose an email or select a template
Select your template
Selecting your template will generate your text and populate all of your fields from the case details, you will now have an opportunity to review before clicking "Send E-mail" to send the message.