Default email merge fields are great at pulling supporter information into your messages. But what if you need to change the message based on the information you pull in — to include a tax-deductible disclaimer on receipts for donations made in your currency but hide the disclaimer on receipts for foreign contributions, for example. Or what if you want to tell donors the impact of their donation by multiplying the donation amount by the number of meals each dollar will provide. Are all of these possible?
Absolutely! All email and SMS templates in Raisely have access to conditional logic and template helpers, and you can use these to evaluate and manipulate data using certain conditions.
Conditional Logic
Conditional logic lets you show or hide content based on supporter or donation information. If a condition is met, the content will appear. If a condition isn't met, the content will stay hidden.
Add Conditions to Your Messages
Conditions are kind of like a sandwich: they're made by squishing your juicy content between two or three merge fields. Every condition starts with
{{#yourCondition}} and ends with {{/yourCondition}} , like this example below:
{{#lt profile.totalPercent 90}}You're almost there - ask your friends to donate today!{{/lt}}
You can also use
{{else}} between the opening and closing merge fields to add backup content in case the condition isn't met. If you wanted to be extra thankful to donors who give generously, for example, you could add the following to your donation receipt:
{{#gte donation.amount 500}}Thank you SO much for your generous donation!{{else}}Thanks for your support!{{/gte}}
If the donor gives $500 or more to your campaign, they will see "Thank you SO much for your generous donation!" in their receipt. If the donor gives less than $500, they will simply see "Thanks for your support!".
Add Conditions to Your Pages
You can also add conditions to your pages, so that the content dynamically changes based on query parameters you have added to your PURLs (Personalised URLs).
Here you are hoping to dynamically change the content displayed on certain values within your PURL. For example, if you wanted to greet someone with their first name that's found in the PURL, or showing a different message based on a different query parameter found in the PURL.
For example, let's say you have the following PURL:
https://campaignsite.com/?firstName=John
You can add the following conditional statement to your home page:
{{#if query.firstName}} Hey {{query.firstName}}, thanks for being a great supporter of the campaign! {{else}} Thanks for being a great support of the campaign!{{/if}}
To further elaborate, let's say you have the following PURL with other query parameters found in the PURL:
https://campaignsite.com/?donorType=regular
You can add the following conditional statement to your home page:
{{#eq query.donorType 'regular'}} As a regular supporter, you help to ensure consistent funding for important programs. {{else eq query.donorType 'major'}} As a generous supporter, you help us shift the needle with making a real impact on these issues. {{else eq query.donorType 'xyz'}} As a xyz supporter, you help us ensure.....{{else}} Help us ensure that.... {{/eq}}
So this then allows you to set up multiple PURLs, with different results on your home page!
Available Conditions
These are all the conditions you can use in messages. X is the data field you want to evaluate, and Y is the field (or value) you want to evaluate against:
Condition |
Definition |
Example |
{{#if X}} {{/if}}
|
X ✅ X is true or exists |
{{#if donation.public.customCheckbox}} Thanks for ticking this box! {{/if}} If the donor ticked a custom checkbox field, this sentence will show. |
{{#eq X Y}} {{/eq}}
|
X = Y X is equal to Y |
Thanks for your generous support!
Sincerely, Global Cause {{#eq donation.currency 'AUD'}} ABN 12345 {{/eq}} {{#eq donation.currency 'USD'}} EIN 12-345 {{/eq}} If the donation's currency is AUD, the receipt will show the organisation's ABN. If the donation's currency is USD, the receipt will show the organisation's EIN.
❓
What if the donation's currency isn't AUD or USD? |
{{#gt X Y}}{{/gt}}
|
X > Y X is greater than Y |
{{#gt donation.amount 499}} Thank you SO much for your extra-generous donation! {{/gt}} If the donation is $500 or more, this sentence will show. |
{{#gte X Y}}{{/gte}}
|
X >= Y X is greater than or equal to Y |
{{#gte profile.total profile.goal}} Massive congratulations, you've reached your fundraising goal! 🙌 {{/gte}} If the fundraiser has met or exceeded their fundraising goal, this sentence will show. 🚀 Pro tip: use 'greater than or equal to' instead of just 'equal to' because it's highly unlikely a fundraiser will raise the exact amount of their goal — they'll probably raise a few dollars more! |
{{#lt X Y}}{{/lt}}
|
X < Y X is less than Y |
{{#lt profile.totalPercent 50}} You're nearly halfway to your goal! Ask your friends to donate today! {{/lt}} If a fundraising profile's total is less than 50% of their goal, this sentence will show. |
{{#lte X Y}}{{/lte}}
|
X <= Y X is less than or equal to Y |
{{#lte profile.totalPercent 10}} You're off to a great start! Share your profile on social media to help get the word out there 🗣 {{/lte}} If a fundraising profile's total is less than or equal to 10% of their goal, this sentence will show. |
Template Helpers
Template helpers let you format and manipulate information in your messages, and they're most commonly used with donation amounts, profile totals, and dates.
Add Template Helpers to Your Messages
While conditional logic needs two merge fields to work, template helpers only use one merge field: the helper itself. Add any of the merge fields listed below to your message, and the merge field will automatically be replaced with the correctly-formatted or -calculated data when the supporter reads their message.
Available Template Helpers
These are all the helpers you can use in messages. X is the first data field you want to evaluate, and Y is the second field (or value) you want to evaluate:
Helper |
Definition |
Example |
{{money [amount] currency='code'}}
|
Shows a currency amount with the symbol for the currency specified.
🚀
Pro tip: add |
You donated
{{money donation.amount currency=donation.currency}}! You donated £25.00! You donated {{money donation.amount currency='GBP' hideCents=1}}! You donated £25! |
{{number X}}
|
Formats large numbers with commas to make the numbers easier to read. {{profile.exerciseTotal}}: 489000{{number profile.exerciseTotal}}: 489,000 |
You have biked
{{number profile.exerciseTotal}} metres to date! You have biked 489,000 metres to date! |
{{ordinal X}}
|
Converts number into ordinal form.
{{profile.total}}: 100 |
You just earned your
{{ordinal profile.total}} dollar! You just earned your one hundredth dollar! |
{{ordinal X true}}
|
Converts number into numeric ordinal form.
{{profile.total}}: 100 |
You just earned your
{{ordinal profile.total true}} dollar! You just earned your 100th dollar! |
{{add X Y}}
|
Inserts the value of X + Y |
You reached your goal of ${{profile.goal}}! Shoot for the stars — increase your goal to $
{{add profile.goal 100}} today! You reached your goal of $500! Shoot for the stars — increase your goal to $600 today! |
{{subtract X Y}}
|
Inserts the value of X - Y |
You only have $
{{subtract profile.goal profile.total}} to raise in order to hit your goal! You can do it! You only have $45.61 to raise in order to hit your goal! You can do it! |
{{multiply X Y}}
|
Inserts the value of X · Y |
Because you gave during our matched giving week, your ${{donation.amount}} donation is now worth $
{{multiply donation.amount 2}}! Because you gave during our matched giving week, your $25.00 donation is now worth $50.00! |
{{divide X Y}}
|
Inserts the value of X ➗ Y |
Every dollar we receive lets us give a warm meal to 4 people in need. Your generous {{money donation.amount currency=donation.currency hideCents=1}} donation just fed
{{divide donation.amount 0.25}} people! Every dollar we receive lets us give a warm meal to 4 people in need. Your generous $25 donation just fed 100 people! |
{{percent X}}
|
Converts X to a percent |
0.76 is
{{percent 0.76}} of 1. 0.76 is 76% of 1. |
{{percent X Y}}
|
Shows X as a percentage of Y |
You've raised
{{percent profile.total profile.goal}} of your goal! You've raised 59% of your goal! |
Formatting Date and Time in messages
Messages in Raisely will default to sending dates in universal time (that's Greenwich Mean Time). If your campaign isn't in the UK, you probably want to customise the timezone your emails use so the dates appear correct to the people who are receiving them. 👍
Your emails currently show dates like: <br>{{prettyDate donation.createdAt}}. This formats them to be human-readable, but won't convert the timezone.
To set a timezone, you need to replace this merge field with:
{{localDate donation.createdAt "Australia/Sydney" "dd/MM/YYYY"}} .
The first section in double-quotes is your timezone, pick one closest to where your donors are. You can find the full list at the bottom of the article in the dropdown menu.
The second section is the format you'd like to display the date in. Common formats are:
- dd/MM/YYYY – displays as 02/11/2021 (British/Australian format)
- MM/dd/YYYY - displays as 11/02/2021 (US format)
You can see here for a full list of formatting options.
Timezones
You can use any of the timezone options available below:
Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers Africa/Asmera Africa/Bamako Africa/Bangui Africa/Banjul Africa/Bissau Africa/Blantyre Africa/Brazzaville Africa/Bujumbura Africa/Cairo Africa/Casablanca Africa/Ceuta Africa/Conakry Africa/Dakar Africa/Dar_es_Salaam Africa/Djibouti Africa/Douala Africa/El_Aaiun Africa/Freetown Africa/Gaborone Africa/Harare Africa/Johannesburg Africa/Juba Africa/Kampala Africa/Khartoum Africa/Kigali Africa/Kinshasa Africa/Lagos Africa/Libreville Africa/Lome Africa/Luanda Africa/Lubumbashi Africa/Lusaka Africa/Malabo Africa/Maputo Africa/Maseru Africa/Mbabane Africa/Mogadishu Africa/Monrovia Africa/Nairobi Africa/Ndjamena Africa/Niamey Africa/Nouakchott Africa/Ouagadougou Africa/Porto-Novo Africa/Sao_Tome Africa/Tripoli Africa/Tunis Africa/Windhoek America/Anchorage America/Anguilla America/Antigua America/Araguaina America/Argentina/La_Rioja America/Argentina/Rio_Gallegos America/Argentina/Salta America/Argentina/San_Juan America/Argentina/San_Luis America/Argentina/Tucuman America/Argentina/Ushuaia America/Aruba America/Asuncion America/Bahia America/Bahia_Banderas America/Barbados America/Belem America/Belize America/Blanc-Sablon America/Boa_Vista America/Bogota America/Boise America/Buenos_Aires America/Cambridge_Bay America/Campo_Grande America/Cancun America/Caracas America/Catamarca America/Cayenne America/Cayman America/Chicago America/Chihuahua America/Coral_Harbour America/Cordoba America/Costa_Rica America/Creston America/Cuiaba America/Curacao America/Danmarkshavn America/Dawson America/Dawson_Creek America/Denver America/Detroit America/Dominica America/Edmonton America/Eirunepe America/El_Salvador America/Fortaleza America/Glace_Bay America/Godthab America/Goose_Bay America/Grand_Turk America/Grenada America/Guadeloupe America/Guatemala America/Guayaquil America/Guyana America/Halifax America/Havana America/Hermosillo America/Indiana/Knox America/Indiana/Marengo America/Indiana/Petersburg America/Indiana/Tell_City America/Indiana/Vevay America/Indiana/Vincennes America/Indiana/Winamac America/Indianapolis America/Inuvik America/Iqaluit America/Jamaica America/Jujuy America/Juneau America/Kentucky/Monticello America/Kralendijk America/La_Paz America/Lima America/Los_Angeles America/Louisville America/Lower_Princes America/Maceio America/Managua America/Manaus America/Marigot America/Martinique America/Matamoros America/Mazatlan America/Mendoza America/Menominee America/Merida America/Mexico_City America/Moncton America/Monterrey America/Montevideo America/Montreal America/Montserrat America/Nassau America/New_York America/Nipigon America/Nome America/Noronha America/North_Dakota/Beulah America/North_Dakota/Center America/North_Dakota/New_Salem America/Ojinaga America/Panama America/Pangnirtung America/Paramaribo America/Phoenix America/Port-au-Prince America/Port_of_Spain America/Porto_Velho America/Puerto_Rico America/Rainy_Rive America/Rankin_Inlet America/Recife America/Regina America/Resolute America/Rio_Branco America/Santa_Isabel America/Santarem America/Santiago America/Santo_Domingo America/Sao_Paulo America/Scoresbysund America/Sitk America/St_Barthelemy America/St_Johns America/St_Kitts America/St_Lucia America/St_Thomas America/St_Vincent America/Swift_Current America/Tegucigalpa America/Thule America/Thunder_Bay America/Tijuana America/Toronto America/Tortola America/Vancouver America/Whitehorse America/Winnipeg America/Yakutat America/Yellowknife Antarctica/Casey Antarctica/Davis Antarctica/DumontDUrville Antarctica/Macquarie Antarctica/Mawson Antarctica/McMurdo Antarctica/Palmer Antarctica/Rothera Antarctica/Syowa Antarctica/Vostok Arctic/Longyearbyen Asia/Aden Asia/Almaty Asia/Amman Asia/Anadyr Asia/Aqtau Asia/Aqtobe Asia/Ashgabat Asia/Baghdad Asia/Bahrain Asia/Baku Asia/Bangkok Asia/Beirut Asia/Bishkek Asia/Brune Asia/Chita Asia/Choibalsan Asia/Colombo Asia/Damascus Asia/Dhaka Asia/Dili Asia/Dubai Asia/Dushanbe Asia/Hong_Kong Asia/Hovd Asia/Irkutsk Asia/Jakarta Asia/Jayapura Asia/Jerusalem Asia/Kabul Asia/Kamchatka Asia/Karachi Asia/Katmandu Asia/Khandyga Asia/Kolkata Asia/Krasnoyarsk Asia/Kuala_Lumpur Asia/Kuching Asia/Kuwait Asia/Macau Asia/Magadan Asia/Makassar Asia/Manila Asia/Muscat Asia/Nicosia Asia/Novokuznetsk Asia/Novosibirsk Asia/Omsk Asia/Oral Asia/Phnom_Penh Asia/Pontianak Asia/Pyongyang Asia/Qatar Asia/Qyzylorda Asia/Rangoon Asia/Riyadh Asia/Saigon Asia/Sakhalin Asia/Samarkand Asia/Seoul Asia/Shanghai Asia/Singapore Asia/Srednekolymsk Asia/Taipei Asia/Tashkent Asia/Tbilisi Asia/Tehran Asia/Thimphu Asia/Tokyo Asia/Ulaanbaatar Asia/Urumqi Asia/Ust-Nera Asia/Vientiane Asia/Vladivostok Asia/Yakutsk Asia/Yekaterinburg Asia/Yerevan Atlantic/Azores Atlantic/Bermuda Atlantic/Canary Atlantic/Cape_Verde Atlantic/Faeroe Atlantic/Madeira Atlantic/Reykjavik Atlantic/South_Georgia Atlantic/St_Helena Atlantic/Stanley Australia/Adelaide Australia/Brisbane Australia/Broken_Hill Australia/Currie Australia/Darwin Australia/Hobart Australia/Lindeman Australia/Melbourne Australia/Perth Australia/Sydney CST6CDT EST5EDT Etc/GMT Etc/GMT+1 Etc/GMT+10 Etc/GMT+11 Etc/GMT+12 Etc/GMT+2 Etc/GMT+3 Etc/GMT+4 Etc/GMT+5 Etc/GMT+6 Etc/GMT+7 Etc/GMT-1 Etc/GMT-10 Etc/GMT-11 Etc/GMT-12 Etc/GMT-13 Etc/GMT-2 Etc/GMT-3 Etc/GMT-4 Etc/GMT-5 Etc/GMT-6 Etc/GMT-7 Etc/GMT-8 Etc/GMT-9 Europe/Amsterdam Europe/Andorra Europe/Astrakhan Europe/Athens Europe/Belgrade Europe/Berlin Europe/Bratislava Europe/Brussels Europe/Bucharest Europe/Budapest Europe/Busingen Europe/Chisinau Europe/Copenhagen Europe/Dublin Europe/Gibraltar Europe/Guernsey Europe/Helsinki Europe/Isle_of_Man Europe/Istanbul Europe/Jersey Europe/Kaliningrad Europe/Kiev Europe/Kirov Europe/Lisbon Europe/Ljubljana Europe/London Europe/Luxembourg Europe/Madrid Europe/Malta Europe/Mariehamn Europe/Minsk Europe/Monaco Europe/Moscow Europe/Nicosia Europe/Oslo Europe/Paris Europe/Podgorica Europe/Prague Europe/Riga Europe/Rome Europe/Samara Europe/San_Marino Europe/Sarajevo Europe/Simferopol Europe/Skopje Europe/Sofia Europe/Stockholm Europe/Tallinn Europe/Tirane Europe/Ulyanovsk Europe/Uzhgorod Europe/Vaduz Europe/Vatican Europe/Vienna Europe/Vilnius Europe/Volgograd Europe/Warsaw Europe/Zagreb Europe/Zaporozhye Europe/Zurich Indian/Antananarivo Indian/Chagos Indian/Christmas Indian/Cocos Indian/Comoro Indian/Kerguelen Indian/Mahe Indian/Maldives Indian/Mauritius Indian/Mayotte Indian/Reunion MST7MDT PST8PDT Pacific/Apia Pacific/Auckland Pacific/Efate Pacific/Enderbury Pacific/Fakaofo Pacific/Fiji Pacific/Funafuti Pacific/Galapagos Pacific/Guadalcanal Pacific/Guam Pacific/Honolulu Pacific/Johnston Pacific/Kosrae Pacific/Kwajalein Pacific/Majuro Pacific/Midway Pacific/Nauru Pacific/Niue Pacific/Noumea Pacific/Pago_Pago Pacific/Palau Pacific/Ponape Pacific/Port_Moresby Pacific/Rarotonga Pacific/Saipan Pacific/Tahiti Pacific/Tarawa Pacific/Tongatapu Pacific/Truk Pacific/Wake Pacific/WallisCannot find the support guide you are after? Head on over to our YouTube channel 📺 for more creative content to help you go further. You can even leave us comments, suggesting new content ideas 🤯
Comments
0 comments
Please sign in to leave a comment.