Dynamic email templates
< Back to Review page documentation
Overview
Dynamic email templates enable the automation of personalized content in emails, enhancing engagement by addressing recipients directly. This document will guide you through the process of creating and using dynamic email templates effectively.
Table of Contents
- 1 Overview
- 2 What are Dynamic Email Templates?
- 3 Benefits of Using Dynamic Email Templates
- 4 How do I enable an automated email template for Forms?
- 5 How do I create a communication template?
- 6 Dynamic communication template options
- 6.1 Dynamic fields
- 7 Dynamic Information from Applications
- 8 Conditional Email Syntax
- 8.1 Full example
- 9 Comparing phrases with Space(s) in between
- 9.1 Examples
- 10 Chaining Multiple Conditions
- 10.1 Using AND (&&)
- 10.2 Using OR (||)
- 11 Testing your email templates
- 12 Troubleshooting
- 13 Everything looks setup correctly but the conditional emails aren’t working properly
- 14 Trying to compare invalid Characters
What are Dynamic Email Templates?
Dynamic email templates are pre-designed email layouts that allow specific parts of the content to be automatically replaced with personalized data or content specific to each recipient. These templates use placeholders, such as {studentFirstname}, which are replaced with real data when the email is sent.
Benefits of Using Dynamic Email Templates
Personalization: Increases engagement by personalizing the email content for each recipient.
Efficiency: Saves time by automating the customization of each email.
Consistency: Ensures consistent email formatting while allowing for personalized content.
Scalability: Makes it easy to send large volumes of personalized emails quickly.
How do I enable an automated email template for Forms?
Automated email templates are distributed to the applicant based on the status of the form
Click “Settings” from the main menu
Click “Communications” from the sub-menu
Click “Email Templates” from the main menu
How do I create a communication template?
Click “Settings” from the main menu
Click “Communications” from the sub-menu
Click “Custom templates” from the main menu
Click the “Create Template” button
You will be presented with a dialog with the communication template options
See below for form and communication options
Click “Save”
Create communication template
Listed below are the form fields of the create an email/SMS/voice message template dialog:
Field name | Description |
---|---|
Name | Name of your template |
School | Select a specific school who should see this template Note: You can select district-wide to apply to all schools |
Reply-to address | Email address to be displayed in the reply-to if a user clicks reply in their email |
Subject | The email subject line (for SMS and Voice Messages, this is used for internal history and ease of reference) |
Message | The body of the email or the message to be sent to the recipient |
Dynamic communication template options
Dynamic fields allow you to automatically populate placeholders with real information from your school data. This usually involves specifying the placeholder in the template:
For the school substitutions, the information must have been entered in the schools list under the settings of SchoolEngage.
Dynamic fields
Option | Description |
---|---|
{createdDate} | The date and time that the form was submitted |
{currentDate} | The date this email was generated |
{appId} | The ID of the Application this email is for |
{formName} | The name of the Form this email is for |
{email} | The email address of the recipient |
{parentFirstName} | The first name of the application submitter |
{parentLastName} | The last name of the application submitter |
{studentFirstName} | The first name of the application assignee |
{studentLastName} | The last name of the application assignee |
{school} | The name of the school the application is assigned to |
{schoolEmail} | The email of the above school |
{schoolPhone} | The phone number of the above school |
{schoolDesc} | The description of the above school |
{schoolAddress} | The address of the above school |
{statusComment} | The comment that was written when the application was approved/denied |
{hyperLink} | A link to the application that created this email in SchoolEngage, this will also contains the authentication used to allow a user to fill out a parent polling form without logging in. |
Dynamic Information from Applications
Option | Description |
---|---|
{$fieldName} | The displayed value for any field on the application |
{_fieldName} | The internal value for any field on the application |
In the above example gathering from a dropdown with a grade predef, would get you the following.
{$grade} → Grade 3
{_grade} → 3
When collecting information from a form into email templates, you need to use the field name of you are pulling the info from. The field name for each field can be edited in the form management interface and should be unique from other fields on the form if you are going to be using it in this manner.
Conditional Email Syntax
It is possible to have different messages appear depending on the values in the form. You can have many different conditional statements in your template, but they must not be nested (contained within each other).
In order do do this, you can use the following syntax:
{if(<field>==<value>)}
The if command will only show the content between it and the next command if the value in <field> matches <value>
{else if(<field>==<value>)}
The else if command functions identically as if, and is used for each additional condition after the first
{else}
The else command will display the content between itself and {end} if none previous if or else if statements succeeded
The command to close the final the final statement
instead of `==`, you can use `!=` as the command "Does Not Equal".
Full example
Comparing phrases with Space(s) in between
If you wish to compare phrases which contain spaces in between, be sure to wrap the phrase in ' '
or the condition will not work as expected
Examples
{if($studentFirstName==John Doe)}
{if($studentFirstName=='John Doe')}
{if($grade==Grade 5)}
{if($grade=='Grade 5')}
Chaining Multiple Conditions
You can chain multiple conditions by using the AND (&&) and OR (||) operators to create more complicated conditions.
Using AND (&&)
When chaining conditions with &&, every condition must be met to satisfy the if statement.
Using OR (||)
When chaining conditions with ||, at least one condition must be met to satisfy the if statement.
Full Example with Chained conditions
Testing your email templates
It is always a good idea to test these substitutions before they go live to ensure that they are working in the intended fashion.
Troubleshooting
Everything looks setup correctly but the conditional emails aren’t working properly
If you’ve followed the above steps and the email generated includes the conditions within the email itself, it could be due to the HTML structure of the email.
Example:
What you see:
{if(_fieldName==0 || _fieldName==1)}
What is passed to the system
<span>{if(_fieldName==0 || _fieldName== 1)</span><span>}</span>
Please consult the SchoolEngage team if the dynamic email you’ve setup isn’t sending as expected!
Trying to compare invalid Characters
If you input invalid characters within the comparison {if(<field>==<target_value>)}
, it will not display the messages as expected.
Example:
Template Setup:
{if($school==My School@Test)} Here is my Test {end}
Here, the entire condition “{if($school==My School@Test)} Here is my Test {end}
" will be visible on the outgoing email.
This is because of the '@' symbol in “My School@Test”