Mail Merge Fields
Donor Tools uses the Liquid markup language to insert actual values into letters and emails.
Liquid works primarily by replacing variables surrounded by double-brackets like this:
{{ a_variable }}. A comprehensive overview of Liquid is available at
http://wiki.github.com/tobi/liquid/liquid-for-designers
The following mail merge fields are available in Donor Tools.
Donor
| Field | Description |
|---|---|
| {{ donor.name }} | Joe Donor |
| {{ donor.first_name }} | Joe |
| {{ donor.last_name }} | Donor |
| {{ donor.company_name }} | Megacorp, Inc. |
| {{ donor.address }} | 1234 5th St Wallawalla, WA 55555 |
| {{ donor.street_address }} | 1234 5th St |
| {{ donor.city }} | Wallawalla |
| {{ donor.state }} | WA |
| {{ donor.postal_code }} | 55555 |
| {{ donor.salutation }} |
Joe
If you have not filled in a value for this field, Donor Tools will automatically use the first name. |
| {{ donor.salutation_formal }} |
Mr. Donor
If you have not filled in a value for this field, Donor Tools will automatically use the prefix followed by the last name. Or if there is no prefix Donor Tools will just use the first name. |
| {{ donor.recognition_name }} |
Joe, Janet, and Joey Donor
If you have not filled in a value for this field, Donor Tools will automatically try to generate a recognition name for you. |
| {{ donor.first_names }} | Joe, Janet, and Joey |
| {{ donor.total_donations }} | $2,500.00 |
| {{ donor.total_donations_this_year }} | $1,000.00 |
| {{ donor.total_donations_last_year }} | $1,000.00 |
| {{ donor.donations_count }} | The number of donations by a donor |
| {{ donor.donations_this_year_count }} | The number of donations by a donor this year |
| {{ donor.donations_last_year_count }} | The number of donations by a donor last year |
| {{ donor.donations }} | An array of the donor's donations |
| {{ donor.donations_this_year }} | An array of the donor's donations from this year |
| {{ donor.donations_last_year }} | An array of the donor's donations from last year |
| {{ donor.donations_this_fiscal_year }} | An array of the donor's donations from this fiscal year |
| {{ donor.donations_last_fiscal_year }} | An array of the donor's donations from last fiscal year |
| {{ donor.donations_this_month }} | An array of the donor's donations from this month |
| {{ donor.donations_last_month }} | An array of the donor's donations from last month |
| {{ donor.donations_this_week }} | An array of the donor's donations from this week |
| {{ donor.donations_last_week }} | An array of the donor's donations from last week |
Donation
| Field | Description |
|---|---|
| {{ donation.id }} | The unique identifier for a donation. |
| {{ donation.describe }} | $123.00 for Elementary Schools received on Jun 8, 2009 |
| {{ donation.amount }} | 50.00 |
| {{ donation.formatted_amount }} | $50.00 |
| {{ donation.fund }} | Elementary Schools |
| {{ donation.funds | join: " and " }} | Elementary Schools and Poverty Relief |
| {{ donation.received_on }} | Feb 26, 2009 |
| {{ donation.received_on_long }} | February 26, 2009 |
| {{ donation.received_on_short }} | 02/26/09 |
| {{ donation.check_number }} | 1234 |
| {{ donation.check_date }} | Feb 26, 2009 |
| {{ donation.check_date_long }} | February 26, 2009 |
| {{ donation.check_date_short }} | 02/26/09 |
| {{ donation.soft_credits }} | Fred Frederickson (Fundraiser) |
| {{ donation.soft_credits_names }} | Fred Frederickson |
Soft Credit
| Field | Description |
|---|---|
| { donor.soft_credits } |
An array of this person's
soft credits
Example:
|
Letter/Email Fields
| Field | Description |
|---|---|
| {{ current_date }} | Today's date (e.g. April 10, 2010) |
| {{ current_time }} | The current time (e.g. 06:12 PM) |
| {{ letter_date }} | The date that the letter was created (e.g. May 19, 2012 ) |
| {{ letter_time }} | The time that the letter was created (e.g. 06:12 PM) |
Other Fields
| Field | Description |
|---|---|
| {{ user.first_name }} | The first name of the currently signed in user |
| {{ user.last_name }} | The last name of the currently signed in user |
| {{ user.email_address }} | The email address of the currently signed in user |
| {{ user.title }} | The title of the currently signed in user |
| {{ organization.name }} | This organization's name |
Liquid Syntax
The {{ donation.split }} object is an array of the splits for this donation. You can loop over this array or apply liquid filters .
Conditional Statements
Thanks for your
{% if donor.donations_count > 2 %} ongoing
{% elsif donor.donations_count >= 1 %} renewed
{% else %} generous {%endif%}
contribution of {{ donation.describe }}.
Looping over splits in a donation:
{% for split in donation.splits %}
{{ split.formatted_amount }} for {{ split.fund }}
{% endfor %}
Looping over all a donor's donations:
{% for donation in donor.donations %}
{{ donation.describe }} {% endfor %}
Looping over all a donor's donations, but only if there is more than one:
{% if donor.donations.size > 1 %}
Here's a list of all your donations so far: {% for donation in donor.donations %}
{{ donation.describe }} {% endfor %}{% endif %}
Looping over all a donor's donations from this fiscal year:
{% for donation in donor.donations_this_fiscal_year %}
{{ donation.describe }} {% endfor %}
Join funds with comma:
{{ donation.funds | join: ", " }}