Conditional statements can be used across CharityEngine donor facing applications to customize content and donor experience based on real time data. By adding a conditional blocks to page content or email receipts, you can create different messages that will be displayed to your donors and contacts depending upon the data and tokens available.
To add a conditional block to a form, navigate to contents tab on your form and select the page you wish to add the conditional block. In the below example, the conditional block will be added to the success page.
Click Conditional Block on the tool bar to add the conditional statement. When added, this block contains sample language that will assist you in understanding how to structure your conditional content.
Once you add the conditional block, you will need to insert your conditions, if true, and if false statements. For example, if you would like a different message to be displayed for donors that donated more than $500, the conditional block would look like the below. In the below conditional statement, the transaction amount token is being used to drive the content. Any token available in the tokens modal can be used in the conditional block.
If the transaction amount is greater than $500, the message would be “Thank you for your generous gift!”. If the donation was less than $500, the message would be “Thank You”.
As you can see below, when the transaction was $500, the donor only receives a thank you
And when the donation is greater than $500, the message says thank you for the generous gift!
Another use case for the conditional block is for tribute donations. When tribute donations are made, you may want to add a special thank you and recognize the gift in a special way or change the message based on the tribute type. Below you can see the tribute type token was used and when the tribute type Id is 1 then the “Thank you for making a donation to honor another.” will be displayed. There are three conditional statements within the below example for the three types of tribute.
Note: There are three different types of tributes: Behalf, Honor, and in Memory of. If the tribute types is Behalf, that means the donations was made in the name of another person. If the tribute type is Honor, that means the donation was made to honor another contact, for example if the fundraiser was for Breast Cancer, the donation could be to honor someone who is struggling with the disease. If the tribute type is in Memory of, the donation was made to remember someone who has passed, for example, someone who has lost their battle with a disease.
The tribute type Id's are listed below:
in Memory of:2
Conditional blocks can be used in other places besides forms as well. You can add conditional blocks to templates for receipts. To do this, navigate to Configuration > Design & Messages > Templates and find the template you wish to add the conditional block to. A great use for a conditional block in a receipt template is for inserting a signature when a donation is less than a certain amount or leaving it black for a manual signature if the donation is greater than a certain amount.
As you can see if the transaction amount is less than $250, an automated signature will be inserted to the receipt. If the transaction amount is greater than $250 an executive or major gifts officer will have space to manually sign or personalize the thank you letter. This add a layer of customization and lets a donor who gifts a large amount feel special because they received a hand signed letter from a member of your organization.
More examples of using the Conditional Blocks
Conditional Blocks can be used anywhere on your forms for a variety of different reasons. Another way to use the conditional block is changing a greeting message on your landing page based on the donation amounts that have been received. For example, you can have one message for when your goal has been met and another when the goal has not been met. Below you can see the conditional statement states if over $1000 has been received as revenue on the form use “Let’s work together to continue raising for animal conservation” and until then state “ Help us meet our goal”.
On the form, these would be displayed on the landing page as can be seen below. The first image is prior to the goal being met and the second is once the goal of $1000 has been met.
Another great use for the conditional block is differentiating between the monthly donors and the one-time donors. By using a conditional block, you can display different messages based on the type of donor they are. This block would be used on the Success page as the donor would see it after they have made the donation. Below you can see if the sustainer payment frequency is 4, which in this case would mean that the doner selected monthly payments, then display “Thank you for your monthly gift! You will be charge [[transaction.amount]] each month until you cancel.” And if they make a one-time gift, it will display “Thank you for your one-time gift!”
Note: when creating conditional blocks, it is easier to build a conditional block based on the presence of data instead of the lack of data. For example, it would be much harder to build the above example in reverse order and base the conditional statement on the one-time gift as there would be no sustainer data with the one-time gift.