How to Use Both AND and OR Conditions When Targeting Users

Bailey Lawson Updated by Bailey Lawson

What is a Nested Query?

If you're looking to send a campaign using both AND and OR between filters, this is called a nested query. For example, sending a campaign to:

Segment A AND (Segment B OR Segment C)

In Hive, you can only have either AND or OR between each filter. But there is a way in Hive to build a nested query to get the results you're looking for. This article will use the above example of Segment A AND (Segment B OR Segment C).

  1. On your Segments page, click + New Segment button.
  2. On the Create Segment page, type in your Segment Name.
  • Select Live Segment if you want your segment to automatically update if new subscribers meet the requirements of the filter.
  • Select Static Segment if you only want to capture the subscribers that meet the requirements of the filters at this point in time.
  1. Select the filters that will have "OR" in between them. Then click Save Segment.

Building Your Email Campaign

  1. In the Choose Recipients step of the email campaign builder, select the Segment filters for users who are in Segment A AND users who are in Segment B Or C

How did we do?

How HSTS Can Break Links in Hive

How to Set Default Merge Tag Values

Contact