Defining Logic for Query Segments
When viewing your marketing lists (or form submission lists, etc.) click the dropdown beside the list name and choose Create a Segment (see Creating a Segment for more details). The Query method is selected by default.
The logic you use to combine your queries (AND, OR, or a custom blend) determines whether contacts need to meet all of your search requirements or only some of them.
- AND is the strictest way to set up your query
- Every criteria must be met for a contact to appear in this segment (eg., job title contains 'Marketing' AND opened at least 3 messages AND lead score at least 20)
- This will yield the smallest number of contacts, but with the highest level of accuracy to the rules that you set
- Typically, AND is used with a variety of query types to find a very specific cross-section of your audience
- OR is the loosest way to set up your query
- Only one criteria must be met for a contact to appear in this segment (eg., job title contains 'Marketing' OR job title contains 'Brand' OR company name contains 'Agency')
- This will yield a larger segment, but with a broader range of matched criteria
- Typically, OR is used with similar query types to allow you to case a wider net
- CUSTOM lets you combine queries using both AND and OR
- Every specific query will be given a number if you choose this option – use each number to assemble a logical statement for your segment
- Use parentheses to indicate grouping of related queries
- Query 1 is "job title contains 'Marketing'," query 2 is "job title contains 'Brand'," and query 3 is "lead score at least 20"
- You should likely use (1 OR 2) AND 3 to state that you need either job title, with a required lead score of 20+
- You can assemble as many queries as you like using this method, but they can quickly become complex with multiple ANDs and ORs – check your segment often to make sure you are getting the expected results