Help Center Home
Queries: How to Build a Query for Organizations and Non-Deceased People

Introduction

Users may need to create a single contact list that includes both organizations and individual constituents while excluding people who have been marked as deceased. This can be useful when creating email recipient lists, exports, Communication Series audiences, or other communication and fundraising lists.

This article explains how to create a Contact Query that returns:

Prerequisites

Before creating the query, ensure:

Instructions – Creating the Contact Query

Step 1: Create a New Contact Query

Navigate to Queries and select New Query.

Select the Contacts data source.

Step 2: Add the Output Fields

Add the fields that should be returned in the query results.

Common output fields may include:

Additional fields can be added based on how the query results will be used.

Step 3: Add the Email Filters

Add the following filters to ensure the query only returns contacts who are configured to receive email and have an email address.

Filter 1

Field: Receive Email
Operator: Equals
Value: 1

This filter limits the results to contacts with Receive Email enabled.

Filter 2

Field: Primary Email Address
Operator: Not Equals
Value: Leave blank

This filter excludes contacts that do not have a Primary Email Address.

Step 4: Build the Contact Type Logic

Create an OR group to include both Organizations and eligible People.

Within the OR group, add the following condition:

Field: Type
Operator: Equals
Value: Organization

Next, create an AND group beneath the OR group.

Within the AND group, add the following conditions:

Field: Type
Operator: Equals
Value: Person

Field: Deceased
Operator: Not Equals
Value: 1

This logic returns all eligible Organizations or People who are not marked as deceased.

Step 5: Review the Filter Structure

The completed filter hierarchy should be configured as follows:

Receive Email = 1

AND

Primary Email Address is not blank

AND

(
Type = Organization

OR

(
Type = Person

AND

Deceased does not equal 1
)
)

The visual filter structure should resemble:

Outcome

Once the query is configured, the results will include Organizations with a Primary Email Address that are configured to receive email.

The results will also include People who:

The query will exclude deceased People, contacts without a Primary Email Address, and contacts with Receive Email disabled.

This query can be used to support email recipient lists, exports, Communication Series audiences, and other marketing or fundraising communication lists.

FAQ & Further Reading

Q. Why are some Organizations missing from the query results?

A. Verify that the contact's Type is set to Organization, the contact has a Primary Email Address, and Receive Email is enabled.

Q. Why are some People missing from the query results?

A. Confirm that Receive Email is enabled, a Primary Email Address exists, and the contact is not marked as deceased.

Q. Why are deceased contacts appearing in the query results?

A. Confirm that the Deceased field is correctly configured on the contact record. The query filter should be configured as Deceased > Not Equals > 1 rather than Equals > 0, as blank values may also represent contacts who are not marked as deceased.

Q. What can this query be used for?

A. The query can be used to create master email lists, newsletter recipient lists, Communication Series audiences, contact exports, and marketing or fundraising communication lists.

   


Articles

Powered by Powered By CharityEngine