You can do things like addressing your activists by their first name or displaying a user's ZIP/postal code or the nearest event near them by using clips.
To access these clips, click the last button in the visual editor, on the right. 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 code {{ FirstName | default: "Friend" }}
will be added to your email. 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, you choose the "Custom Field Value" clip (see the 'inserting custom field values' example below.) Then you 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 the email body, subject lines, from lines, preview text, and email wrappers and layouts. They can be used in the bodies of mobile messages as well. When you're using clips in the email and mobile message bodies, you can auto-complete basic clips, like FirstName, by typing in {{
and selecting the appropriate clip from the list of options.
Note: Make sure to test your clips thoroughly. We have advanced error messages (more here), which allow you to see some common mistakes in your liquid. For example, if you're missing a curly bracket in the body then you'll get an error message asking if you meant to use a Liquid tag here, and 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. You can check out this doc to understand which each error means.
Note: You can use personalization datasets in place of complex if/else statements. More here. 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.
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. To use this feature, click the "Send As Another Activist" button and enter the email of the activist you want to send as. That activist will need to be subscribed to your list to work correctly. Click save, then send your test, and we'll deliver the test to you (or whomever you enter in the test email box) using their data in the 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 here 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. 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!
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 times 1.5. If they have not donated previously (therefore no highest previous contribution), then the system will output 5.
2. 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,”
3. 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 themy 'phone number' custom field. If they don't have a work phone number on their activist record, it will say 'your work phone?'.
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/pasting from the Questions and Custom Fields page'
4. 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.
5. 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.
6. Difficult: Using multiple conditions in an if/else statement to output volunteer info
{% 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.
7. 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.