Merge Fields
Merge fields (also called merge tags) put the recipient's own data into an email. A merge field is a placeholder in double curly braces, such as {{profile.first_name}}, written in the subject or body. When the email is sent, Full Fabric replaces it with the value for that recipient, so one template produces a personal email for each person.
Subject: Your application to {{class.name_with_programme}}
Dear {{profile.first_name}},
Thank you for applying. Your journey owner, {{profile_owner.first_name}},
will be in touch before {{class.start_date}}.
Inserting a Merge Field
In the email editors, open Merge tags in the toolbar. Fields are grouped and labelled as Group: Field, for example Profile: First name. Selecting one inserts its placeholder at the cursor. Placeholders can also be typed by hand.
Merge Field Groups
Which groups the menu offers depends on where the email is sent from, because each group needs something to read from: a profile, an application, an event, and so on.
| Group | Example placeholder | Filled in from |
|---|---|---|
| Institution | {{institution.name}}, {{institution.logo_url}} |
The institution. Always available. |
| Profile | {{profile.full_name}}, {{profile.<field>}} |
The profile the email is about, with all its profile fields |
| Recipient | {{full_name}}, {{<field>}} |
The person receiving the email, when different from the profile |
| Journey | {{journey.<field>}} |
The journey fields of the profile's journey in that class or course |
| Journey owner | {{profile_owner.first_name}} |
The staff member who owns that journey |
| Journey campus | {{campus.name}}, {{campus.<field>}} |
The campus of that journey |
| Class / Programme | {{class.name}}, {{class.start_date}}, {{programme.name}} |
The class (cohort), its class fields, and its programme |
| Course / Subject | {{course.credits}}, {{subject.code}} |
The course and its subject. Shown only when the institution sells courses. |
| Payment plan / Payment plan fee | {{payment_plan.outstanding_amount}}, {{payment_plan.fee.due_date}} |
A payment plan and one of its fees |
| Application | {{product_name}}, {{candidate_application_url}} |
An application |
| Candidate | {{candidate_profile_url}} |
The candidate in staff notifications |
| Event | {{event_name}}, {{event_start_date}}, {{add_to_ical}} |
An event registration |
| Form | {{form_name}}, {{form_submission}} |
A form submission |
| Evaluation | {{candidate_evaluation_url}}, {{evaluation_assignee_first_name}} |
An evaluation assignment |
| Campaign | {{manage_policies_url}} |
The recipient's marketing preferences link |
| This email | Varies | Values a system email provides, such as a password reset link |
Dates come in several formats, for example {{class.start_date}} (long form), {{class.start_date_as_ddmmyyyy}} and {{class.start_date_as_yyyymmdd}}. Address fields are split into parts, each with its own placeholder.
Note: Profile fields that you are not allowed to see are left out of the menu. They are still filled in if typed by hand.
What Each Place Offers
| Sent from | Groups offered |
|---|---|
| Shared template library | Every group, since any feature may use the template |
| A campaign | Profile and Campaign, plus Institution |
| An email to a profile | Profile, plus Institution |
| An event message or reminder | Profile and Event, plus Institution |
| An application notification | Application and its related groups, plus Institution |
| A system email | The groups that system email provides, plus This email |
A field from a group the sender does not provide renders blank. For example, {{event_name}} is blank in a campaign.
Empty Values
When a profile has no value for a field, the placeholder renders as nothing. Write the text around it so it still reads well, or use a condition.
Conditional Content
Templates support conditions in curly braces with percent signs, so content can depend on the recipient's data:
{% if profile.first_name %}Dear {{profile.first_name}},{% else %}Hello,{% endif %}
Tip: Send a test email to an address that belongs to a real profile to check conditions and values before sending.
Older Placeholder Style
Templates written before the current style may use vertical bars, such as |first_name|. These are converted to the curly-brace form and keep working.
If a Merge Field Cannot Be Filled In
Full Fabric checks every email before sending. If filling in a merge field fails with an error, the email is stopped rather than sent with the error text in it.
Related
- Email Templates
- System Emails
- Custom Fields: the profile fields available as merge fields