We’re giving this guide a refresh
Your feedback helps us make these guides even more useful. Use the buttons at the bottom of the article to tell us whether this one hit the mark or left you more confused than when you started. This helps us prioritise which articles are updated next.
What Is The Query Builder?
Queries allow you to gather together activists who share common attributes based on tags, actions and field values. They can be set up once and then imported into reports and email targeting to save you having to create the same targeting rules repeatedly. In simple terms, you tell Action Network who you want to target and Action Network will target those people.
To set Query Builder as your default mode for reporting and targeting check this guide:
What Are Rules?
Rules are the criteria you set to return a group of activists. They tell Action Network which activists to Include or Exclude based on certain conditions being met. For example, you could set up a Query based on the Rule: Include Activists Who Have The Local_ Pary Value of Trafford Green Party. The Query Builder combines the rules you create to return your results.
What Are Groups?
Groups within a Query are an easy way to add both And and Or conditions to your Query. So for example you may run a Query based on the following statement: "Target all activists in my local party area with a Membership_Status of Current with either a Student or Concessionary Membership."
Do I Choose 'And' Or 'Or'?
Usually you'll be aiming to target everyone who meets all of your criteria- so you may think of it as something like "I want to target everyone who is a current member and lives in my local party area.", but occasionally it's useful to capture people who meet one of two or more criteria such as "I want to target everyone who has signed our petition or made a donation via our fundraising page. Creating a Query based on Or arguments will return all activists who meet at least one of the criteria set out in your rule.
Which Fields Are Based On Green Party Data?
When building a Query in Action Network it's useful to know which fields are based on the data the Green Party hold on our activists, such as Membership_Type and Local_Party. Luckily, in Action Network all of this falls under the Field Value rule. Here you'll find all the Green Party specific data held centrally, along with any Custom Fields that have been created by you or your fellow admins.
To understand which fields are updated centrally check this guide:
Building A Query In Action Network
There are a few places where you can build a Query in Action Network.
- In the Queries menu: This is where you create Queries you'll want to use more than once. You can save Queries and then import them everywhere else you use Queries.
- When building a Report: You can create a Query from scratch, import an existing Query, or combine multiple Queries.
- When targeting an Email: You can create a Query from scratch, import an existing Query, or combine multiple Queries.
For the purpose of this article, we'll be showing you how to create a Query within the Queries menu, but the instructions are the same regardless of where you create your Query.
Before building your Query it's a good idea to think about who it is you want to target. If you're not familiar with the Query Builder it can help to make a note of the type of activist you want to target before you start.
What Do The Different Filters Mean
When creating rules it's helpful if you understand what the different filters used for creating rules mean. Some of the rules will not be relevant to your Queries because they are based on US fields- State, Legislative District...etc., or relate to functions of Action Network we don't currently use such as Mobile Messaging.
Filter | Explanation | Filter | Explanation |
State
| These are US states and territories so will not be relevant to your queries.
| Donors
| This allows you to target activists who have donated to your group.
|
County
| These are US counties so will not be relevant to your queries.
| Active Recurring Donors
| This allows you to target activists based on whether they have an active recurring donation set up.
|
Legislative District
| These are US Legistative Districts so will not be relevant to your queries.
| Failing Recurring Donors
| This allows you to target activists whose recurring donation has failed.
|
Country
| This is unlikely to be used unless your are actively targeting international members.
| Canceled Recurring Donors
| This allows you to target activists who have cancelled their recurring donation.
|
Zip/Postal Code and Radius
| This allows you to capture activists with a certain distance of a UK postcode.
| One-Click Donors
| This allows you to target activists who have made a one-click donation.
|
City & Radius
| These are US cities so will not be relevant to your queries.
| Donation Level
| This allows you to target activists based on how much they have donated over a specified time period.
|
Event Campaign Radius
| This will capture activists within a certain radius of an event campaign.
| Source Codes
| This allows you to target activists based on a Source Code, and can be used to track all activists with that source code, or only new activists that have been generated via that Source Code.
|
Network Groups
| Used to capture activists within different groups- ie. more than one local party or other type of group.
| Tags
| This allows you to target activists based on their Tags.
|
Language
| This allows you to target activists based on their language.
| Field Value
| This allows you to target activists based on a Field Value.
|
Letter/Call Campaign Targets
| This allows you to target activists based on whether they've previously been targeted as part of a letter or call campaign.
| Unique ID
| Allows you to target activists via an upload of Unique IDs.
|
Actions
| This allows you to target activists based on them completing one of your actions.
| Reports
| This allows you to target activists based on whether they have been targeted in a previous report.
|
Emails
| This allows you to target activists based on them being targeted by a previous email.
| Action Activity
| This allows you to target activists based on the number of actions they've taken over a specified time period.
|
Email Openers
| This allows you to target activists based on whether they have opened a specific previously sent email.
| Email Open Activity
| This allows you to target activists based on the number of emails they've opened over a specified time period.
|
Email Clickers
| This allows you to target activists who've clicked any link within a specific email.
| Email Click Activity
| This allows you to target activists based on the number of times they have clicked on any link within an email over a specified period of time.
|
Mobile Messages
| This allows you to target activists based on whether they've received a particular mobile message.
| Mobile Message Click Activity
| This allows you to target activists based on the number of times they've clicked any link in a mobile message over a specified time period.
|
Mobile Message Clickers
| This allows you to target activists who've clicked any link within a specific mobile message.
| Email Subscription Date
| This allows you to target activists based on the time their email subscription status changed.
|
Ladders
| This targets activists based on whether they've been through a certain ladder.
| Mobile Subscription Date
| This allows you to target activists based on the time their mobile subscription status changed.
|
Getting Started
To access the Query Builder head to the top navigation bar, click on People. Hover over Queries and click on the + symbol.
Give your Query a name. Make sure it explains who the Query targets so any of the other Action Network admins in your group know when to use it, and who exactly it targets.
Navigating The Query Builder
When first creating a Query no Filters will be applied. If you ran this Query it would target all activists within your Group. You'll see a couple of controls on the Query Builder.
- AND/OR: This is used to tell Action Network if you want to target activists who meet all of your criteria (AND), or activists who meet at least one of your criteria (OR).
- + Add rule: This enables you to add a new row with a criteria you set.
- + Add group: This allows you to add a group of rules to allow for combinations of AND/OR filters.
- [choose a filter]: This is the dropdown menu from which you'll select the criteria you want to set.
- x Delete: This will delete the filter to which it corresponds.
Example Query: All Local Party Activists Who Have Fallen Into Grace
1. To create a Query to capture all local party activists who have fallen into Grace you'll first need to tell the Query Builder which local party you're targeting. This is an important step, as you may have activists in your Group from outside of your local party area who have signed up for updates, completed an action, or have previously lived in your local party area. Just click on the dropdown menu labelled [choose a filter] and select Field Value.
2. The filter will already be set to include as default. Set the 'field named' value to Local_Party and the 'with value' text box as your local party name as it appears in the top left of Action Network.
To understand which fields are updated centrally and should be used in Queries check this guide:
3. Click on + Add Rule and a new row will appear.
4. Again set the first dropdown to Field Value, and set the 'field named' to Membership_Status and the 'with value' field to Grace.
5. Hit the SAVE QUERY button, and your Query will be saved and available to use in Reports and when targeting Emails.
Now you've set up your first Query you can create some more- but if you need some inspiration check out this guide: