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.

Add a filter

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.

To add your own custom filter expression to a tenant:

  1. In the Content Editor, navigate to /sitecore/system/Data Exchange/<tenant>/Tenant Settings/Providers/xConnect/Filter Expressions/Contact Filter Expressions.

    Insert filter expression
  2. To add a new contact filter, right-click Contact Filter Expressions, click Insert, and then click Filter expression.

  3. Navigate to the new filter. On the Content tab, in the Logical Operator field, click the logical operator you want to use to chain filter conditions together.

    Select logical operator for filter conditions
  4. Right-click the filter expression you created. In the Insert menu, click the condition you want to add to the filter.

    Add condition to filter expression
  5. In the Content Tree, select the condition you just created. In the Content tab, specify the filter conditions. The filter type determines which conditions are available.

  6. Save the item.