--- title: "Check for duplicate lines" slug: "create-a-duplicate-check-config-record" description: "Create the duplicate check configuration that you can use for searching for the duplicates of product lines. " updated: 2023-06-29T17:18:04Z published: 2023-06-29T17:18:04Z canonical: "docs.zilliant.com/create-a-duplicate-check-config-record" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.zilliant.com/llms.txt > Use this file to discover all available pages before exploring further. # Create duplicate check configuration record ## Сreate a Duplicate Check configuration record 1. On the **Duplicate Check Configurations** tab, select **New**. 2. In the **New Duplicate Check Configuration** dialog, enter or select values: - **Name**—Enter a name for the duplicate check configuration. - **Batch size**—​Enter the number of records to process, from 1 to 10000. The default batch size is **200**. Tip The more complex matching criteria you have and the more records you are evaluating, the lower the number should be. - **Matching criteria**—String criteria that defines how records should be compared in order to find duplicates. See [Matching criteria](/v1/docs/check-for-duplicate-lines#matching-criteria) for more information. - **Lines to Evaluate Filter**—Optional string filter criteria that defines which records will be evaluated. If not defined, all records will be evaluated. For the syntax, it should be a part of the SOQL query that you would include in the WHERE clause. Tip Do not use when adding lines; by default, all new lines are evaluated. - **Candidate Duplicate Lines Filter**—Optional string filter criteria that defines which records the duplicate search will be run against. If not defined, all records are processed. For the syntax, should be a part of the SOQL query that you would include in the WHERE clause. Note Both **Lines to Evaluate Filter**​ and **Candidate Duplicate Lines Filter** filter conditions should use the same syntax as the WHERE clause of the SOQL query. For example, to use only active lines, set the filter to **Status__c = 'Active'**. - **Target Object**—API name of the **sObject** you will use duplicate search for. For example, **zpl_ContractLineItem_c**. 3. Select **Save**. ### Matching criteria Matching criteria defines the fields you want to compare and how. It is a string that specifies conditions on how the fields in a candidate line should be compared to fields in the evaluated line. #### Example The line is considered a duplicate if both of the following conditions are true: - Fields **Account__c**, **LineLevel__c**, and **LevelValue__c** are the same. - Effective dates (the range defined by the **StartDate_c** and **EndDate__c** fields) overlap. The matching criteria for this business case looks like this: ``` Account__c = Account__c) AND (LineLevel__c = LineLevel__c) AND (LevelValue__c = LevelValue__c) AND (((StartDate__c >= StartDate__c) AND (StartDate__c <= EndDate__c)) OR ((EndDate__c >= StartDate__c) AND (EndDate__c <= EndDate__c))) ``` The matching criteria defines a set of field comparison criterias. A field comparison criteria can compare only a field on a candidate line to a field on an evaluated line. The system cannot define literal values in the matching criteria (e.g. **Status__c = "Active"**); a filter condition must be used instead. Matching criteria is built from field conditions combined using **AND** and **OR** operators and parenthesis. Field condition: ``` Field1 = Field2 ``` - Field1 is a field from potential duplicate record that should match the value of Field2 from evaluated record (record we are trying to find a duplicate of). - '=' is a comparison operator. The following table shows allowed comparison operators. | Operator | Description | | --- | --- | | = | Equal to | | > | Greater than | | >= | Greater than or equal to | | < | Less than | | <= | Less than or equal to | | != | Not equal to | Use AND and OR operators to combine field conditions: ``` (FieldCondition1) AND (FieldCondition2) AND (FieldConditions3) ... (FieldCondition1) OR (FieldCondition2) OR (FieldConditions3) ... ``` Each field condition must enclosed in parenthesis. Parenthesis must be used to ensure correct order of operation. They can also be used to create complex expressions: ``` (FieldCondition1) AND (((FieldCondition2) AND (FieldConditions3)) OR ((FieldConditions4) AND (FieldConditions5))) ``` ## Define a Deal Manager Duplicate Check Configuration 1. Go to **Deal Manager Duplicate Check Configs** tab and select **New**. 2. In the **New Deal Manager Duplicate Check Config** dialog, enter or select values: - **Name**—​Enter a user-friendly label. - **Duplicate Check Configuration**—Select the configuration you created in the [Create a duplicate configuration record](/v1/docs/check-for-duplicate-lines#create-a-duplicate-configuration-record). - **Filter Candidate Duplicates By Header**—Selected by default. A Boolean that defines whether the **Candidate Duplicate Lines** should be limited by the current deal. Automatically combined with the **Candidate Duplicate Lines Filter** from the **Duplicate Check Configuration**. - **Filter Lines To Evaluate By Header**—Selected by default. A Boolean that defines whether **Lines to Evaluate** should be limited by the current deal. Automatically combined with the **Lines To Evaluate Filter** from the **Duplicate Check Configuration**. Tip Do not use when adding lines; by default, all new lines are evaluated. - **Quick Action Duplicate Check Message**—Optional, the name of the **Custom Label** to override the message shown after duplicate check via Quick Action. If not defined, **zpl.DuplicateLinesWereFoundMessage** or **zpl.NoDuplicatesFoundMessage** **Custom Label** will be used. - **Add Line Duplicate Check Message**—optional, the name of the **Custom Label** to override message shown after duplicate check when adding lines. If not defined, **zpl.AddLinesDuplicateCheckMessageLabel Custom Label** will be used. 3. Select **Save**.