# 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.
