Learn how to personalize Action Network emails and mobile messages using clips, Liquid syntax, custom fields, tags, and fundraising data.
You can do things like addressing your activists by their first name, displaying a user's ZIP/postal code, or showing the nearest event by using clips.
In this article:
- Using personalization clips
- Fundraising clips and date ranges
- Personalization datasets
- Testing clips
- Using Liquid with clips
-
Clip and Liquid examples
- 1. Multiplying donation ask amounts
- 2. Average donation amount over a date range
- 3. Using additional filters in a greeting
- 4. Highest previous donation for one-time donors
- 5. Inserting custom field values
- 6. Using tags to output content
- 7. Using the Language clip
- 8. Conditional donation asks for high and low donors
- 9. Using multiple conditions to output volunteer information
- 10. Using multiple tags to output different information
- 11. Custom thank you page redirects
Using personalization clips
To access these clips, click the Clips button at the far right of the visual editor toolbar. Then, click on a clip to insert it into your email where your cursor is.
Clips have an easy-to-understand syntax that lets you customize their appearance to your activists when you send your email. For example, by clicking First Name, the following code will be added to your email:
{{ FirstName | default: "Friend" }}When the email is sent to your activists, their first name will be substituted for the code. If their first name isn't on file, the default value will be used instead. You can change the default value by entering different text.
Some clips are a little more complex, and their use will be explained in the default clip code that appears after you choose the clip.
For instance, to output a custom field value that your activist previously filled out, choose the Custom Field Value clip (see the inserting custom field values example below). Then, edit the code it outputs to add the name of the custom field you'd like to output, as shown in the default code that appears after you click the clip.
Clips may be used in:
- Email bodies.
- Email subject lines.
- Email from lines.
- Email preview text.
- Email wrappers and layouts.
- Mobile message bodies.
When you're using clips in email and mobile message bodies, you can auto-complete basic clips, like FirstName, by typing {{ and selecting the appropriate clip from the list of options.
Note: Make sure to test your clips thoroughly. We have advanced error messages that allow you to see some common mistakes in your Liquid.
For example, if you're missing a curly bracket in the body, you'll get an error message asking if you meant to use a Liquid tag here, and you won't be able to proceed to target until it's fixed.
The error message will be placed where the error is — for example, one of the bodies, the subject lines, or the email wrapper. Learn more about Liquid error messages and what they mean.
Fundraising clips and date ranges
Note: Most of the fundraising clips below can take an optional date range argument in the format date_range: 'YYYY/MM/DD-YYYY/MM/DD'. While you can use different date ranges for different clips, you can never use two different date ranges for the same clip.
Last canceled recurring donation clips
Clips are available in email and mobile messages for the last canceled recurring donation date and amount:
-
LastCanceledRecurringDonationDate: The date of the last canceled recurring donation. -
LastCanceledRecurringDonationAmount: The amount of the last canceled recurring donation.
You can use them in emails and mobile messages. To add them, click Clips in the email editor toolbar, or Add Clips in a mobile message, and choose the clip.
Like other fundraising clips, they can take a date range and a default:
Last canceled recurring donation date
{{ LastCanceledRecurringDonationDate date_range: '2020/01/01-2025/01/01' | default: '' }}Last canceled recurring donation amount
{{ LastCanceledRecurringDonationAmount date_range: '2020/01/01-2025/01/01' | default: '' }}These clips work well in a ladder that uses the Canceled Recurring Donation trigger.
Donation type filters
Donation clip outputs can also be filtered by whether the donation is recurring using the following filters:
recurring_onlyno_recurrencesall
For example:
{{ HighestPreviousContribution date_range: '2000/01/01-2025/12/31' donation_types: 'no_recurrences' }}This will return a donor's highest previous donation, excluding any donations that were part of a recurring contribution.
Note: These filters can only be used along with the date_range filter and will not work on their own.
By default, the HighestPreviousContribution clip includes all donations, including recurring contributions, so these filters will let you break your donor data down further.
Personalization datasets
You can use personalization datasets in place of complex if/else statements.
For example, you can create a personalization dataset that outputs the voter registration deadline for an activist depending on their state, without using Liquid's if/else statements.
Learn more about personalization datasets.
Testing clips
You can send a test to yourself but as another activist. This is useful for testing clips — the email will be delivered to you but use their data, so you'd see their first name outputted, for example.
- Click the Send As Another Activist button.
- Enter the email address of the activist you want to send as. That activist will need to be subscribed to your list to work correctly.
- Click Save.
- Send your test email.
We'll deliver the test to you (or whomever you enter in the test email box) using the selected activist's data in the clips.
Using Liquid with clips
Clips can be used in conjunction with the Liquid template language, allowing you to perform complex if/then logic, loops, and other conditional content operations.
This can be used to multiply donation asks, customize content based on tags and custom fields, and more.
See Liquid for Designers for more information about Liquid's syntax and features.
We do not have the capacity to provide custom Liquid support. Therefore, we don't recommend using complex if/then logic and loops if you aren't already familiar with them.
We've provided a few examples of using filters, tags, and if/else statements to produce advanced outputs. We also recommend beginners start with Shopify's Liquid Reference or the many resources available online.
And remember — test, test, test!
Clip and Liquid examples
1. Easy: Using two filters to multiply donation ask amounts
{{ HighestPreviousContribution | times: 1.5 | default: 5 }}What it does: It will output a person's highest previous contribution multiplied by 1.5. If they have not donated previously (therefore no highest previous contribution), then the system will output 5.
2. Easy: Outputting the average donation amount for an activist over a set date range
{{ AverageContributionAmount date_range: '2023/01/01-2024/01/01' | default: '10' }}What it does: This will output the average contribution amount for an activist between January 1, 2023 and January 1, 2024. If someone didn't donate, they'll get the default amount of 10.
The date should be zero-padded and written as year/month/day (yyyy/mm/dd).
Important note on date ranges: While you can use different date ranges for different clips, you can never use two different date ranges for the same clip.
3. Easy: Using additional filters in a greeting
{{ FirstName | capitalize | default: 'Hey' }},What it does: It will capitalize the first letter of the activist's first name if it is not already capitalized. So instead of "brian," it will say "Brian."
If they do not have a first name on their record, the email will say "Hey,".
4. Easy: Outputting highest previous donation for one-time donors
{{ HighestPreviousContribution date_range: '2000/01/01-2025/12/31' donation_types: 'no_recurrences' }}What it does: This will return an activist's highest previous donation out of all one-time contributions the individual has made.
Using the no_recurrences filter, any contributions that are part of a recurring series are not included in the calculation of the highest previous contribution.
This filter, along with the recurring_only and all filters, can only be used when using a date range filter with them.
5. Medium: Inserting custom field values
Can I reach you at {{ 'work phone number' | form_value | default: 'your work phone number' }}?What it does: It will output an activist's value for the 'work phone number' custom field. If they don't have a work phone number on their activist record, it will use the default value, 'your work phone number'.
Note: Insert the Form Value clip at the bottom of the clips pop-up. Put the name of the custom field between the quotes in the custom_field_name_whose_value_will_be_displayed section.
Make sure that you copy the custom field name exactly (including spaces, capitalization, and spelling). We recommend copying and pasting from the Questions and Custom Fields page.
6. Medium: Using the tag true/false to output content
{{ 'climate change' | contains_tag }}{% if contains_tag %}
P.S. -- our climate change team is preparing to deliver a petition to the UN. Sign up here to join them.
{% else %}{% endif %}What it does: Let's say you have a tag for your activists who are passionate about climate change. You want to ask your most active climate change activists (who read all the way through your newsletters) if they want to help deliver a petition to the UN.
At the bottom of the email, if they have the climate change tag, they will see information on how to sign up to deliver the petition. If they do not have the climate change tag, they will not see anything.
7. Medium: Using the Language clip to show people content in a certain language
{% if Language == 'es' %}
Este mensaje es para activistas que hablan español.
{% else %}
This message is for activists that speak English.
{% endif %}What it does: Your list of activists may all speak different languages, so it's important to reach out to them in their preferred language.
You can use the Language clip to write different translations of an email in one place. You can then note if someone has a certain language code in their core field and send them the specific text they will see.
In the above example, anyone with es in the core language field will see a message in Spanish. Everyone else, including anyone without data in the field, will see the default written in English, which follows at the end.
8. Difficult: Using a complex if/else statement for high donors or low donors
{% capture HPC %}{{ 'HighestPreviousContribution' }}{% endcapture %}
{% assign HPC_number = HPC | times: 1 %}
{% if HPC_number <=5 %}
Please donate $10.
{% else %}
Consider doubling your donation -- please donate {{ HighestPreviousContribution | times: 2 }}
{% endif %}What it does: If their highest previous contribution is $5 or less, we ask them to donate $10. If they have contributed more than $5, we will ask them to double their donation.
9. Difficult: Using multiple conditions in an if/else statement to output volunteer information
{% capture volunteer_capacity %}{{ 'volunteer' | form_value }}{% endcapture %}
{% assign volunteer_capacity = volunteer_capacity %}
{% if volunteer_capacity == 'phonebank' %}
For phonebanking, please arrive at 1pm on Saturday.
{% elsif volunteer_capacity == 'canvass' %}
For canvassing, please show up at 10am on Sunday. Wear comfortable walking shoes!
{% elsif volunteer_capacity == 'data_entry' %}
For data entry, please arrive at 3pm on Sunday. Please bring your computer.
{% else %}
Please sign up here to volunteer.
{% endif %}What it does: Let's say you have a radio button question on a volunteer form that asks people how they want to volunteer — phone banking, canvassing, or doing data entry.
Their responses are stored as values in the custom field volunteer.
If they said they wanted to phonebank, we will send them information on phone banking. If they said they wanted to canvass, we will send them information on canvassing. If they said they wanted to do data entry, we will send them information on data entry.
If they did not select one of those radio buttons, then we will send them the form again to sign up to volunteer.
10. Difficult: Using multiple tags in an if statement to output different information
{{ 'Parent' | contains_tag }}{% if contains_tag %}Here's our working group for parents. {% endif %}
{{ 'Teacher' | contains_tag }}{% if contains_tag %}Here's our working group for teachers. {% endif %}
{{ 'Student' | contains_tag }}{% if contains_tag %}Here's our working group for students.{% endif %}What it does: Let's say you have different tags for various roles in your organization. You want their responses stored as tags so you can send them information about different working groups you have.
If they had one of the various tags, they would receive the relevant information for that tag. If they had both tags, like Parent and Teacher, they would receive information for both of those tags.
11. Difficult: Using clips for custom thank you page redirects on action pages
{{ 'my_major_donor_tag' | contains_tag }}
{% if contains_tag %}https://secure.actblue.com/donate/major-donor-page?amount=1000
{% else %}https://secure.actblue.com/donate/default-donor-page{% endif %}What it does: Redirects activists to any link after taking action rather than our default thank you page.
If someone has your major donor tag, they will be sent to a donation page with a suggested donation amount of $1,000. If they do not have this tag, you can redirect people to a different donation site.
This Liquid should be used in the Thank You Redirect Link box of the Action Manage page for any action. This Liquid can also work with custom fields instead of tags.