# Filter which entries to synchronize

Abstract

How to use a query filter to limit the number of entries to synchronize to or from Sitecore.

When you use a Data Exchange Framework (DEF) tool, such as Sitecore Connect for Salesforce CRM, to synchronize entries between a provider and xConnect, you can add a filter that limits which entries are included in the synchronization.

DEF adds the filters to the query it uses to select the entries for synchronization. You can therefore use filters to optimize the synchronization by limiting the number of entries the connector processes.

In addition to the filters provided in DEF, you can create custom filter expressions.

To add a filter to a pipeline:

1. In the Content Editor, navigate to the connector tenant. Navigate to the pipeline you want to modify. Navigate to the pipeline step that reads the entries.

For example, if you use the Sitecore Connect for Salesforce CRM connector to synchronize contacts, navigate to Data Exchange\[salesforce tenant]\Pipelines\Salesforce Campaigns to xConnect Sync Pipelines\Read Contacts from Salesforce Pipeline\Read Contacts from Salesforce.

2. In the Content tab, in the Filter Expressions field, select the filter you want to apply to the synchronization.

### Note

In some pipeline steps, the field where you select the filter can have a name other than Filter Expressions. However, the name usually includes the word Filter.

3. Save the item.

## Create a custom filter expression

Data Exchange Framework contains a number of default filter expressions.

1. In the Content Editor, navigate to /sitecore/system/Data Exchange/<tenant>/Tenant Settings/Providers/xConnect/Filter Expressions/Contact Filter Expressions.
2. To add a new contact filter, right-click Contact Filter Expressions, click Insert, and then click Filter expression.