Liquid is a template language created by Shopify and used by many different software projects and companies. Administrators can use Liquid to build emails and webpages that combine static content, which is the same wherever it is placed, and dynamic content, which changes from one location to the next. The Liquid elements act as placeholders: when the code in the file is compiled and sent, the Liquid is replaced by data from the Neon Fundraise campaign it's associated with. Neon Fundraise uses Liquid to load dynamic content in campaign emails and websites, primarily in the form of placeholders.
The article serves as a cheat sheet, listing all of Neon Fundraise's liquid elements for quick reference. For our full liquid documentation, click here.
Neon Fundraise Liquid Objects
Neon Fundraise Liquid objects output pieces of data from a Neon Fundraise campaign. When adding an object to an email or webpage, objects are wrapped in double curly brace delimiters {{.}}
. Liquid objects contain attributes to output dynamic content in the email or webpage.
Organization
The Organization
object contains information related to an organization. All organization information included in this object is editable in the Org Admin by clicking on the "i" icon in the top right when on the organization level.
Availability: The Organization
object is a global object, which means it's available in any email, including email blasts and Admin Email Templates, and in any editable area on the website.
Attributes: The Organization
object has the following attributes:
- Organization.Name
- Organization.Address_Line1
- Organization.Address_Line2
- Organization.Phone
- Organization.Tax_ID
- Organization.Website
Campaign
The Campaign
object contains information related to a Neon Fundraise campaign.
Availability: The Campaign
object is a global object, which means it's available in any email, including email blasts and Admin Email Templates, and in any editable area on the website.
Attributes: The Campaign
object has the following attributes:
- Campaign.Name
- Campaign.Alternate_Name
- Campaign.Location
- Campaign.URL
- Campaign.Description
- Campaign.Goal_Amount
- Campaign.Amount_Raised
- Campaign.Amount_To_Goal
- Campaign.Event_Year
- Campaign.Event_Date
- Campaign.Dashboard_URL
- Campaign.Terms
Address
The Address
object contains information related to the primary user associated with the present email. User address can be changed by the user in their User Profile, or by an administrator through the Admin Panel user record.
Availability: The Address
object is available anywhere a user being addressed. Consequently, it's available in any email, including email blasts and Admin Email Templates, but not in editable areas on the website.
Attributes: The Address
object has the following attributes:
-
Address.Address1
-
Address.Address2
-
Address.City
-
Address.State
-
Address.Zip
-
Address.Country
-
Address.Phone
User
The User
object contains information related to a user.
Availability: The User
object is available anywhere there is a user. Consequently, it's available in any email, including email blasts and Admin Email Templates. The User
object is available on the personal and team (with Captain
handle) fundraising pages (for defaults). The User object is also available in any editable area or dictionary entry throughout the campaign site with the handle Current_User
. Keep in mind that this only recognizes a logged in user, so be sure to use an if tag or default filter to account for the non-logged in user.
Different attributes of the User
object will be available depending on where it's being used. Additionally, the object handle will be different depending on where it's being used. For example, in the Online Donation Confirmation email, there are two User
objects, labeled Donor
and Fundraiser
. To determine the proper handle in a given environment, open the Placeholders popup to see how the User
object is referenced. The various possible handles for the User object are listed here:
- User (when not otherwise specified, use this handle)
- Current_User
- Donor
- Primary_Registrant
- Registrant
- Registered_By
- Fundraiser
- Captain
Attributes: The User
object has the following attributes:
-
User.First_Name
-
User.Last_Name
- User.Salutation
- User.Suffix
-
User.Company
-
User.Email
- User.Is_Primary
-
User.Is_Fundraiser
-
User.Is_Attendee
-
User.Is_Team_Captain
- User.Roles (array of Role object)
- Fundraiser extension:
- Fundraiser.Goal_Amount
- Fundraiser.Amount_Raised
- Fundraiser.Amount_To_Goal
- Fundraiser.Campaign_Name
- Fundraiser.Fundraising_Page
- Fundraiser.Direct_Donate
- Fundraiser.Connected_Facebook_Fundraiser
- Fundraiser.Has_Facebook_Fundraiser
- Registrant extension:
- Registrant.Registration_Fee
- Registrant.Registration_Fields
- Registrant.Amount_Discounted
Team
The Team
object contains information related to a Neon Fundraise team.
Availability: The Team
object is available anywhere there may be a team. It is available in most emails, including email blasts and Admin Email Templates, as well as in the defaults of team pages. It is not available in editable areas on the website.
Attributes: The Team
object has the following attributes:
- Team.Name
- Team.Captains
- Team.Member_Count
- Team.Goal_Amount
- Team.Amount_Raised
- Team.Amount_To_Goal
- Team.Fundraising_Page
Role
The Role
object contains information related to a role assigned to a registrant who registered through the Role Registration Flow.
Availability: The Role
object is available in the Registration emails on Role Registration campaigns.
Attributes: The Role
object has the following attributes:
-
Role.Name
-
Role.Cost
-
Role.Amount_Paid
-
Role.Discount_Amount
-
Role.Label
- Role.Api_Name
- Role.Form_Fields (array of Form Field object)
Donation
The Donation
object contains information related to a Neon Fundraise donation.
Availability: The Donation
object is available in editable areas and dictionary entries on the post-donation thank you page, and all automated emails related to donations. The latter includes:
- Donation Confirmation
- Offline Donation emails
- Recommitment Charge email
- Recurring Donation emails
- Registration emails
- Member/Team Donation Notification emails
- Ticket Purchased emails
- User to User Thank You
Attributes: The Donation
object has the following attributes:
-
Donation.Donor_Display_Name
-
Donation.Amount
-
Donation.Date
-
Donation.Message
- Donation.Recipient (Goal object)
- Donation.Additional_Donation
- Donation.Is_Company_Donation
- Donation.Is_Corp_Sponsorship
- Donation.Is_Pledge
- Donation.Is_Verified
Recurring Donation
The Recurring Donation
object contains information related to a Neon Fundraise recurring donation plan.
Availability: The Recurring Donation
object is available on the following Recurring Donation emails:
- Admin Recurring Donation Instance Failed Notification
- Recurring Donation Instance Failed
- Recurring Donation Plan Ended Notification
- Recurring Donation Plan Modified Notification
- Recurring Donation Plan Reactivated Notification
- Recurring Donation Plan Suspended Notification
Attributes: The Recurring Donation
object has the following attributes:
- Recurring_Donation.Amount
- Recurring_Donation.Status
- Recurring_Donation.Start_Date
- Recurring_Donation.Recurring_Period
-
Recurring_Donation.Recurring_Manage_URL
- Recurring_Donation.Recurring_Upgrade_URL
- Recurring_Donation.Charged_Count
-
Recurring_Donation.Total_Charge_Count
- Recurring_Donation.Failed_Charge_Count
- Recurring_Donation.Currency_Key
Notification
The Notification
object contains information related to a tribute notification submitted by a donor along with their donation.
Availability: The Notification
object is available on the Donation Confirmation and Donation Tribute Notification emails, and only on campaigns or donation pages which have the tribute feature enabled (see here for more).
Attributes: The Notification
object has the following attributes:
-
Notification.Recipient (User object)
-
Notification.Message
-
Notification.Media
-
Notification.Is_Email_Notification
-
Notification.Is_Mail_Notification
-
Notification.Address (Address object)
Ticket
The Ticket
object contains information related to a ticket purchased or reserved through a ticketing page on a campaign or standalone ticketing page.
Availability: The Ticket
object is available on the Ticket Purchased Confirmation email.
Attributes: The Ticket
object has the following attributes:
-
Ticket.Name
-
Ticket.Description
-
Ticket.Price
-
Ticket.Tax_Deductible_Amt
- Ticket.Amount_Discounted
- Ticket.Tickets_Purchased_Count
Form Field
The Form Field
object contains information related to a custom field that was submitted in any form.
Availability: The Form Field
object is available when calling it through another object which has custom fields, such as registrations, donations, or tickets.
Attributes: The Form Field
object has the following attributes:
-
Form_Field.Name
- Form_Field.Api_Name
-
Form_Field.Label
-
Form_Field.Value
Payment
The Payment
object contains information related to a Neon Fundraise payment. Payments are created with every Neon Fundraise transaction, including registrations, donations, and ticket purchases. The Payment
object is also available on refund emails, where its handle is Refund
.
Availability: The Payment
object is available on all transaction emails. These include:
- Donation Confirmation
- Offline Donation Verified
- Recommitment Charged
- Recurring Donation Plan and Instance emails
- Refund Donation Notification (object handle is
Refund
) - Registration Confirmation emails
- RSVP Confirmation
- Ticket Purchased Confirmation
Attributes: The Payment
object has the following attributes:
-
Payment.Name
-
Payment.Amount
- Payment.Base_Amount
- Payment.Additional_Amount_For_Fees
-
Payment.Method
- Payment.Card_Type
-
Payment.Last_Four_Digits_On_Card
- Payment.Card_Exp_Month
- Payment.Card_Exp_Year
- Payment.Bank_Account_Number
- Payment.Bank_Routing_Number
- Payment.Currency_Key
- Payment.Is_Apple_Pay
- Payment.Is_Google_Pay
- Payment.Check_Number
- Payment.Is_Integrated
Goal (Recipient)
The Goal
object contains information related to a fundraising goal in Neon Fundraise. This could be a campaign goal, a team page/goal, a personal fundraising page/goal, or a national team.
Availability: The Goal
object is available primarily as the Recipient
on the Donation
object. Due to the fact that Recipient
is the only forward-facing instance of the Goal
object, we will refer to the object here as Recipient
.
Attributes: The Goal
object has the following attributes:
- Recipient.Type
- Recipient.Name
- Recipient.Goal_Amount
- Recipient.Amount_Raised
- Recipient.Amount_To_Goal
- Recipient.Amount_Raised_Without_Champion
- Recipient.Amount_To_Goal_Without_Champion
- Recipient.Page
- Recipient.National_Team_Id
Match
The Match
object contains information related to a Neon Fundraise donation match.
Availability: The Match
object is available in all automated emails related to donation matching, in the "Post Match Form" social shares, and in match widget site terms.
Attributes: The Donation
object has the following attributes:
-
Match.Donor_Display_Name
-
Match.Match_Donations_To
-
Match.Start_Date
-
Match.Start_Percent
-
Match.Ends_At_Campaign_End
-
Match.End_Date
-
Match.End_Percent
-
Match.Maximum_Amount
-
Match.Donate_Remainder
-
Match.Total_Matched_Amount
-
Match.Payment_Option
Endurance Challenge
The Endurance_Challenge object contains information related to an Endurance Challenge.
Availability: The Endurance_Challenge
object is implemented on the Campaign
, Team
, and User
objects, and is available within those objects in the following emails:
- Registration Confirmation
- Registration Invite
- Fundraiser Goal Reached
- Team Goal Reached
- All Endurance Pledge emails
Attributes: The Endurance_Challenge
object has the following attributes:
- Endurance_Challenge.Name
- Endurance_Challenge.Progress_To
- Endurance_Challenge.Metric
Endurance Goal
The Endurance_Goal
object contains information related the progress towards an Endurance Challenge logged by a fundraiser, or aggregated by a team or campaign.
Availability: The Endurance_Goal
object is implemented on the Campaign
, Team
, and User
objects, and is available within those objects in the following emails:
- Registration Confirmation
- Registration Invite
- Fundraiser Goal Reached
- Team Goal Reached
- All Endurance Pledge emails
Attributes: The Endurance_Goal
object has the following attributes:
- Endurance_Goal.Goal_Amount
- Endurance_Goal.Progress_Amount
- Endurance_Goal.Activity_Count
- Endurance_Goal.Amount_To_Goal
- Endurance_Goal.Amount_Raised_From_Pledges
Endurance Pledges
The Endurance_Pledge
object contains information related to a Neon Fundraise endurance pledge.
Availability: The Endurance_Pledge
object is available in all automated emails related to endurance pledges and in the "Post Endurance Pledge Form" social shares.
Attributes: The Endurance_Pledge
object has the following attributes:
- Endurance_Pledge.Donor_Display_Name
-
Endurance_Pledge.Amount_Per_Metric
-
Endurance_Pledge.Pledge_To (list of Goal objects)
-
Endurance_Pledge.Pledge_For (Endurance_Challenge object)
-
Endurance_Pledge.Start_Date
-
Endurance_Pledge.End_Date
- Endurance_Pledge.Ends_At_Challenge_End
-
Endurance_Pledge.Maximum_Amount
-
Endurance_Pledge.Donate_Remainder
-
Endurance_Pledge.Total_Pledge_Amount
-
Endurance_Pledge.Payment_Option
National Team
The National_Team
object contains information related to a Neon Fundraise national team (see here for more).
Availability: The National_Team
object is generally accessed from the Team
and Fundraiser
objects and will generally be available wherever those are available.
Attributes: The National_Team
object has the following attributes:
- National_Team.Name
- National_Team.Type
- National_Team.Description
- National_Team.Member_Count
- National_Team.Team_Count
- National_Team.Goal_Amount
- National_Team.Amount_Raised
- National_Team.Amount_To_Goal
- National_Team.Fundraising_Page
Summary Letter
The Summary Letter
object contains attributes that can include helpful information on a Donation Summary Letter.
Availability: The Summary Letter
object is available in Summary Letter editable message, which can be edited in the Admin, under Forms > Customize once configured for your organization (click here to learn more).
Attributes: The Summary Letter
object has the following attributes:
- Summary_Letter.Year
- Summary_Letter.Total_Eligible_Amount
Cause
TheCause
object contains information related to a cause, also referred to as Event Listing. A cause/Event Listing is an object that can be associated with a fundraiser and/or donation. The most common use of this feature is for fundraisers to create events that are displayed on their page.
Availability: The Cause
object is available in cause-related emails:
- Member/Team Created Cause
- Custom cause-related email
Attributes: The Cause
object has the following attributes:
- Cause.Name
- Cause.Description
- Cause.Date
- Cause.Total_Amount
- Cause.Address (Address object)
Miscellaneous
There are various miscellaneous Liquid items that are available where they are applicable. Below is a list of Liquid objects, arrays and attributes that aren't included elsewhere.
-
Links
-
Activate_Page_Link
-
Create_Account_Link
-
Confirm_Reg_Link
-
Confirm_Registration_Link
-
Recommitment_Link
-
Reset_Password_Link
-
Verify_Email_Link
-
Fundraiser_PDF_Link
- DAF_Completion_Link
-
-
Amounts
-
Eligible_Amount
- Eligible_Amount_Without_Fees
-
-
Attendee_Count
-
Attendees_Total
- Coupon_Code
- "now"
-
Registered_Via_Social
- User_Personal_Message
Neon Fundraise Liquid Tags
Liquid tags are used to create logic and control flow for templates. They are placed within curly brace percentage delimiters {% %}
.
Control Flow Tags
Control flow tags create conditions that decide whether blocks of Liquid code get executed. Control flow tags:
if
Executes a block of code only if a certain condition is true
.
unless
The opposite of if: executes a block of code only if a certain condition is not met.
else / elsif
Adds more conditions within an if
or unless
block.
case / when
Creates a switch statement to compare a variable with different values. case
initializes the switch statement, and when
compares its values.
Iteration Tags
Iteration tags run blocks of code repeatedly. Iteration tags:
for
Repeatedly executes a block of code.
Variable Tags
Variable tags create new Liquid variables. Variable tags:
assign
Creates a new variable.
capture
Captures the string inside of the opening and closing tags and assigns it to a variable. Variables created through capture are strings.
Neon Fundraise Liquid Filters
Filters are simple methods that modify the output of numbers, strings, variables and objects. They are placed within an output tag {{ }}
and are denoted by a pipe character |
.
Array and Neon Fundraise Array Filters
Array filters change the output of arrays and/or return specific content in the array. Array filters:
all_info
Returns a pre-formatted text block pulled from the array information. This filter works on the following Neon Fundraise arrays:
- Roles
- Registration Fields
- Tickets
contact_info
Returns a pre-formatted text block pulled from the array information. This filter works on the Captain
array, for which it displays the full name (or company if first/last aren’t applicable) and email address of each team captain:
field_by_api_name
Returns the value of any custom field, identified by the api name. Identifying by the api name ensures that the correct field is referenced, being that unique api names are required for custom fields.
field_by_label
Returns the value of any custom field, identified by the field name.
first
Returns the first item of an array.
last
Returns the last item of an array.
list
Returns an array of values in comma delimited format. If there is only one value, it returns the single value. If there are two values, they are separated by "and". If there are three or more values, they are comma separated, with the last item preceded by "and".
map
Creates an array of values by extracting the values of a named property from another object.
term_by_name
Use on the Campaign.Terms
object to access any dictionary term in the campaign.
Math Filters
Math filters allow you to apply mathematical tasks. Math filters can be linked and, as with any other filters, are applied in order of left to right. Math filters:
total_amount
Returns the total amount of all donations in an array.
plus
Adds a number to another number.
minus
Subtracts a number from another number.
times
Multiplies a number with another number.
divided_by
Divides a number by another number.
String Filters
String filters are used to manipulate outputs and variables of the string type. String filters:
adverb
Returns the adverb of a recurring interval. Works specifically on the Recurring Donation
object.
append
Concatenates two strings and returns the concatenated value.
as_int
Casts a string as an integer, which can then be used for mathematical equations. Only works if the string can be converted to an int.
capitalize
Makes the first character of a string capitalized.
downcase
Makes each character in a string lowercase.
natural_language
Prepends the word "Team" to team names that don't already have the word in their name. Works specifically on the Team.Name
object.
prepend
Adds the specified string to the beginning of another string.
prepend_an_or_a
Adds "an" or "a" before the word as grammatically appropriate. Note: only works on a single item — it does not remove the "a" or "an" for a plural version.
remove
Removes every occurrence of the specified substring from a string.
replace
Replaces every occurrence of the first argument in a string with the second argument.
split
Divides a string into an array using the argument as a separator. split
is commonly used to convert comma-separated items from a string to an array.
to_title_case
Makes the first letter of each word in a string uppercase.
upcase
Makes each character in a string uppercase.
Additional Filters
Listed below are additional filters:
cal
(Applies to Campaign
object only.) Returns a URL that provides the user with a calendar invite for the campaign that they can import in their calendar client. The filter populates the campaign name as the event title, the campaign date/time as the event date and start time with a default one hour duration, the campaign location as the event location, and the campaign description as the event description.
date
Converts a timestamp into another date format. Accepts the same parameters as Ruby's strftime
method. You can find a list of the shorthand formats in Ruby's documentation or use a site like strfti.me.
default
Sets a default value for any variable with no assigned value. Can be used with strings, arrays, and hashes.
exists
Checks to see if the object or attribute exists. Does not work on all objects.
is_recurring_donation_recipient
Checks to see if a fundraiser has received a recurring donation. Only works on the User object.
is_self_recurring_donor
Checks to see if a fundraiser has made a recurring donation to their goal. Only works on the User object.
money
Returns a number in monetary format.
name
Returns the user's full name (first and last). If there is no name listed, it will return the company name. Only works for fundraisers, not donor-only or org-level users.