Placeholders allow you to compose highly personalized emails and social shares to contacts. When you insert a placeholder, Rallybound’s template system automatically generates emails and social shares with information appropriate for each specific recipient. Placeholders also add flexibility to FAQs and campaign dictionaries, minimizing the amount of work that needs to be done when replicating a campaign.
For our placeholder system, we use the Liquid Templating Language. This language is very powerful and flexible, allowing administrators to include functions such as “If” tags, loops, and many other functions.
Below we will outline our defined placeholders, explain some of the tags and filters, and give examples to demonstrate their uses. For more advanced use of Liquid Templating, see here: https://github.com/Shopify/liquid/wiki/Liquid-for-Designers.
Defined Placeholder Models
Placeholder Name | How it looks in the code | What is inserted into the email |
Organization-Level Campaign | ||
Name | {{Org_Campaign.Name}} | Name of organization’s campaign |
Alternate Name | {{Org_Campaign.Alternate_Name}} | Alternate name of organization’s campaign |
URL | {{Org_Campaign.URL}} | Link to campaign site |
Description | {{Org_Campaign.Description}} | Campaign description |
Goal Amount | {{Org_Campaign.Goal_Amount | money}} | Campaign goal |
Amount Raised | {{Org_Campaign.Amount_Raised | money}} | Amount raised by campaign to date |
Amount To Goal | {{Org_Campaign.Amount_To_Goal | money}} | Amount of goal not yet raised |
Event Year | {{Org_Campaign.Event_Year}} | Year of event |
Event Date | {{Org_Campaign.Event_Date | date: "%B %d, %Y"}} | Date and time of event Format: January 1, 2015 |
Dashboard URL | {{Org_Campaign.Dashboard_URL}} | Link to Fundraiser Dashboard |
Org-Campaign Terms | ||
Campaign | {{Org_Campaign.Terms.Campaign}} | Term used by the campaign to describe the campaign (e.g., event). |
User | {{Org_Campaign.Terms.User}} | Term used by the campaign to describe a user (e.g., individual). |
Attendee | {{Org_Campaign.Terms.Attendee}} | Term used by the campaign to describe an attendee (e.g., walker). |
Team | {{Org_Campaign.Terms.Team}} | Term used by the campaign to describe a team (e.g., group). |
Captain | {{Org_Campaign.Terms.Captain}} | Term used by the campaign to describe a team captain (e.g., leader). |
Organization Information | ||
Name | {{Organization.Name}} | Organization’s name |
Address Line 1 | {{Organization.Address_Line1}} | Organization’s street address |
Address Line 2 | {{Organization.Address_Line2}} | Organization’s city, state, and zip |
Tax ID | {{Organization.Tax_ID}} | Organization’s tax ID |
Website | {{Organization.Website}} | Organization’s website |
User Address | ||
Address 1 | {{Address.Address1}} | User’s street address |
Address 2 | {{Address.Address2}} | User’s apt/unit information |
City | {{Address.City}} | User’s city |
State | {{Address.State}} | User’s state |
Zip | {{Address.Zip}} | User’s zip code |
Country | {{Address.Country}} | User’s country of residence |
Phone | {{Address.Phone}} | User’s phone number |
User Information | ||
First Name | {{User.First_Name}} | User’s first name |
Last Name | {{User.Last_Name}} | User’s last name |
Company | {{User.Company}} | If user is a company, name of company |
Full Name | {{User | name}} | User’s first and last name if applicable; if not, name of company |
{{User.Email}} | User’s email address | |
Is Fundraiser | {{User.Is_Fundraiser}} | Checks if user is fundraiser |
Is Attendee | {{User.Is_Attendee}} | Checks if user is attendee |
Is Team Captain | {{User.Is_Team_Captain}} | Checks if user is a team captain |
Depending on which user type is being accessed, the name of this model changes in the list and in the code. The information is the same regardless. When writing an “if” statement, ensure you’re using the correct model name in that particular email template. |
Fundraiser Information | ||
Goal Amount | {{Fundraiser.Goal_Amount | money}} | Fundraiser’s goal |
Amount Raised | {{Fundraiser.Amount_Raised | money}} | Amount raised by fundraiser to date |
Amount To Goal | {{Fundraiser.Amount_To_Goal | money}} | Amount of goal not yet raised |
Campaign Name | {{Fundraiser.Campaign_Name}} | Name of fundraiser’s campaign |
Fundraising Page | {{Fundraiser.Fundraising_Page}} | Fundraiser’s personal fundraising page |
Direct Donate | {{Fundraiser.Direct_Donate}} | Link to the donation page on the campaign site with the fundraiser preselected as donation recipient |
These placeholders appear within the User Model when there’s a possibility it is referring to a fundraiser. |
Registrant Information | ||
Registration Fee | {{Registrant.Registration_Fee | money}} | Registration fee of a single registrant |
Registration Fields (All Information) | {{Registrant.Registration_Fields | all_info}} | Name, value, custom description, and price of all registration fields submitted during a single registration. Format: T-Shirt: Medium (Free with $100 raised) $10 Registration.Registration_Fields is a list |
Amount Discounted | {{Registrant.Amount_Discounted | money}} | Discount amount applied to a single registrant’s registration fee |
These placeholders appear within the User Model when it refers to a registrant who is registering. |
Team Information | ||
Name | {{Team.Name}} | Team name |
Captains (Contact Information) | {{Team.Captains | contact_info}} | Names and email addresses for all captains on relevant team |
Member Count | {{Team.Member_Count}} | Number of members on team |
Goal Amount | {{Team.Goal_Amount | money}} | Team’s goal |
Amount Raised | {{Team.Amount_Raised | money}} | Amount raised by team to date |
Amount To Goal | {{Team.Amount_To_Goal | money}} | Amount of team goal not yet raised |
Fundraising Page | {{Team.Fundraising_Page}} | Team’s fundraising page |
Donation Information | ||
Donor Display Name | {{Donation.Donor_Display_Name}} | Name entered by donor to be displayed on the site |
Amount | {{Donation.Amount | money}} | Donation amount Also refers to total payment amount for a ticket purchase |
Date (date) | {{Donation.Date | date: "%B %d, %Y"}} | Date of donation Format: 1/5/2015 |
Date (time) | {{Donation.Date | date: "%I:%M %p"}} | Time of donation Format: 8:16 PM |
Message | {{Donation.Message}} | Personal message sent with donation |
Recurring Charged Count | {{Donation.Charged_Count}} | Amount of times a recurring donation has been processed |
Total Recurring Charge Count | {{Donation.Total_Charge_Count}} | Total amount of times a recurring donation is set to process |
Recurring Period | {{Donation.Recurring_Period}} | The period of time between recurring transactions |
Recurring Manage URL | {{Donation.Recurring_Manage_URL}} | Link at which a user can manage a recurring donation subscription |
Notification Recipient | {{Donation.Notification.Recipient}} | Recipient of notification — this is a standard user object |
Email Notification | {{Donation.Notification.Is_Email_Notification}} | Checks if a third party has been notified via email |
Mail Notification | {{Donation.Notification.Is_Mail_Notification}} | Checks if a third party has been notified via mail |
Notification Address | {{Donation.Notification.Address}} | Notification-recipient’s physical address (if they were notified by mail) — this is a standard address object |
Notification Custom Field | {{Notification.Custom_Fields | field_name: “field name”}} | Any custom fields associated with a tribute form. |
Additional Donation | {{Donation.Additional_Donation | money}} | Amount of a donation submitted along with a ticket purchase |
Recipient (of donation or ticket) | ||
Name | {{Recipient.Name}} | Name of donation recipient (towards whose goal the donation counted — could be a fundraiser, team, or organization campaign) |
Type | {{Recipient.Type}} | Recipient type. Options are Fundraiser, Team, or Org_Campaign. |
Goal Amount | {{Recipient.Goal_Amount | money}} | Donation recipient’s goal |
Amount Raised | {{Recipient.Amount_Raised | money}} | Amount raised by recipient to date |
Amount to Goal | {{Recipient.Amount_To_Goal | money}} | Amount of recipient’s goal not yet raised |
Fundraising Page | {{Recipient.Fundraising_Page}} | Recipient’s fundraising page. In the case of an organization campaign, this is the campaign site. |
Ticket Information | ||
Name | {{Ticket.Name}} | Ticket name |
Description | {{Ticket.Description}} | Ticket description |
Price | {{Ticket.Price | money}} | Price of ticket |
Purchased Count | {{Ticket.Tickets_Purchased_Count}} | Number of tickets purchased |
Tickets (All Information) | {{Ticket | all_info}} | All information related to a single purchase of tickets. If more than one ticket was purchased, all forms related to each ticket are listed. |
Payment Information | ||
Name | {{Payment.Name}} | Billing name associated with payment |
Amount | {{Payment.Amount | money}} | Total payment submitted |
Payment Method | {{Payment.Method}} | Payment method (e.g., credit card) |
Last Four Digits on Card | {{Payment.Last_Four_Digits_On_Card}} | Last four digits on credit card (if applicable) |
Badges Earned | ||
Badge Name | {{Badge.Name}} | Name of badge/achievement |
Description | {{Badge.Description}} | Badge description |
Tracking | ||
Tracking Code | {{Tracking.Tracking_Code}} | Tracking code |
Miscellaneous | ||
User Personal Message | {{User_Personal_Message}} | Personal message added by user to a Donation Thank-You email, or an Invite email. |
Coupon Code | {{Coupon_Code}} | Discount code applied to registration, product, or ticket |
Custom Fields | {{Custom_Fields}} | Custom fields added to forms through the Form Builder, including on the donation form. See below for all_info and field_name filters. |
Temporary Password | {{Password}} | User’s temporary password when signed up through social or by another user |
Reset Password Link | {{Reset_Password_Link}} | Link for user to reset password |
Verify Email Link | {{Verify_Email_Link}} | Link for user to verify email |
Activate Page Link | {{Activate_Page_Link}} | Link for user to activate fundraising page |
Confirm Registration Link | {{Confirm_Reg_Link}} | Link for user to confirm registration |
Create Account Link | {{Create_Account_Link}} | Link for a donor to create an account |
Verify Donation Link | {{Verify_Donation_Link}} | Link for admin to verify an offline donation |
Other Rallybound Sites | {{Other_Rallybound_Sites}} | Different Rallybound site in which a user holds an account |
Admin Logon Page | {{Admin_Logon_Page}} | Admin login site for a given campaign |
Attendee Count | {{Attendee_Count}} | Number of attendees registered in a single registration |
Attendees Total | {{Attendees_Total}} | Total cost of attendees registered in a single registration |
Current Date | {{"now" | date: "[format]"}} | Insert the current date or year based on the date format: "%Y-%m-%d %H:%M" for full date, "%Y" for current year. |
Functions
The Liquid Templating Language allows administrators to customize their templates in powerful ways using tags and filters. We will highlight and explain some of the common ones below, followed by examples for each.
With an if tag, you can send a block of text or information to specified recipients. For example, in an email destined for anyone who has registered on your site, you can use an if tag to send fundraising information only to registrants who signed up as fundraisers.
We have built two common if parameters into the system:
“User.Is_Fundraiser”: checks if a given user is a fundraiser.
“User.Is_Attendee”: checks if a given user is an attendee.
If Tag — Examples | |
{% if User.Is_Fundraiser %} Thank you for agreeing to fundraise for {{Org_Campaign.Name}}! {% endif %} | Within this example template, only fundraisers will receive this message in their email: Thank you for agreeing to fundraise for Charity Walk 2015! For anyone who is not a fundraiser, this message will simply not appear within the email they receive. |
{% if Fundraiser.Amount_Raised >= 1000 %} You’ve raised $1,000! Congratulations {{User.First_Name}}, and keep up the great work! {% endif %} | Within this example template, fundraisers who have raised $1,000 or more will receive this message in their email: You’ve raised $1,000! Congratulations Samantha, and keep up the great work! For anyone who did not raise $1,000, this message will simply not appear within the email they receive. |
{% if User.State == 'California' %} Use discount code CaliforniaRules to receive a $10 discount on your registration! {% endif %} | Within this example template, users who live in California will receive this message in their email: Use discount code CaliforniaRules to receive a $10 discount on your registration! For anyone who does not live in California, this message will simply not appear within the email they receive. |
With a for loop, you can retrieve specific information from a list to include in your email. For example, you can display the first names of all the captains on a team (if there is more than one).
The following items in our templates are lists and may be used in a for loop.
Registrant.Registration_Fields
Contains:Product.Name
Product.Value
Product.Summary
Product.Price
Product.Price_Description
Team.Captains
Contains Fundraiser ModelTicket.Submissions
Contains a list:Custom_Form_Submission
Contains:Custom_Field.Name
Custom_Field.Value
For Loop — Examples | |
{% for Captain in Team.Captains %} {{Captain.First_Name}} {% endfor %} | Displays a list of the first names of all team captains. |
{% for Registration_Field in Registrant.Registration_Fields %} {{Product.Name}}: {{Product.Price | money}} {% endfor %} | Displays a list of all registration field names and prices in the following format: T-Shirt: $10 Cap: $12 Water bottle: $4 |
Filters are words that are added to an item to format it in a specific way. This allows you, for example, to format a date according to your preference, or format a number as currency (with a dollar sign). Filters are appended to items with a pipe (|) and in lowercase, as follows:
{{Model.Item | filter}}
In addition to the standard filters used in the Liquid Templating Language (see here), we have created custom filters to use in our system.
Custom Filters — Examples | ||
Natural Language Adds the word "team" to any team which doesn’t already have “team" in their name. Used when inserting a team name naturally into a sentence. | Example: You are a member of {{Team.Name | natural_language}}! | For team name “Team Rallybound", displays: You are a member of Team Rallybound! For team name "Rallybound", displays: You are a member of Team Rallybound! |
Money Adds a dollar sign before a number. | Example: Your total donation was {{Donation.Amount | money}}. | Displays: Your total donation was $100. |
All Info / Contact Info Collects and displays preset information from specific lists. | Registration Fields: “all_info” displays name, value, custom description, and price. Captains: “contact_info” displays first name and last name (or company if first/last aren’t applicable), and email address of each team captain. Ticket Submissions: “all_info” displays the name and value for each custom field within the submitted form. | |
Exists Checks if a given model holds a value. Mainly used in “if" tags. | Example: {% if Team | exists %} Two heads are better than one: Work together with your team to multiply your fundraising efforts! {% endif %} | Within this example template, users who are a member of a team will receive this message in their email: Two heads are better than one: Work together with your team to multiply your fundraising efforts! |
Name Provides First Name + Last Name or Company if First/Last aren’t available | Format: {{User | name}} | |
Field Name Extracts field name from registration fields list | Format: {{Primary_Registrant.Registration_Fields | field_name: "field name"}} |