# Filter Criteria

Filter Criteria in DBSync Cloud Replication can be used if replication from Salesforce to Database has to be done with certain conditions. Filter Criteria must be specified using ***SOQL***. The detailed illustration with example is shown below.

* ‘Accounts’ object in Salesforce is as shown below and the same needs to be replicated to database only when the ***Type is ‘Customer – Direct’ and SLA is ‘Silver’***.

&#x20;![](https://help.mydbsync.com/docs/download/attachments/53903435/23.png?version=1\&modificationDate=1619726202000\&api=v2)

* In this scenario Type and SLA picklists with various options are as shown.

![](https://help.mydbsync.com/docs/download/attachments/53903435/24.png?version=1\&modificationDate=1619726203000\&api=v2)![](https://help.mydbsync.com/docs/download/attachments/53903435/25.png?version=1\&modificationDate=1619726203000\&api=v2)

* In DBSync Cloud Replication, ***Filter Criteria*** is available under ***Salesforce Sync Object Details*** tab.

![](http://help.mydbsync.com/docs/download/attachments/31983275/exclude.PNG?version=1\&modificationDate=1545928336000\&api=v2)<br>

* SOQL must be used to meet the required criteria. ***API name*** must be used in SOQL. ***Filter Criteria*** must be ***saved*** before running the replication.&#x20;

![](https://help.mydbsync.com/docs/download/attachments/53903435/27.png?version=1\&modificationDate=1619726203000\&api=v2)

* After successful run, Accounts data from Salesforce, only of type ‘Customer – Direct’ and SLA ‘Silver’ will be replicated to database.
* Similarly various SOQL can be used to meet the requirement.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mydbsync.com/cloud-replication-main/objects/filter-criteria.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
