Update Duplicate Check Option

Purpose

To update the previously enabled  Duplicate Check Option configured in your account.

Request Details

Request URL

{api-domain}/crm/{version}/settings/duplicate_check_preference

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope = ZohoCRM.settings.ALL (or)
scope = ZohoCRM.settings.duplicate_check_preference.{operation_type} 

Possible operation types

ALL - Full data access 
UPDATE - Update duplicate record check preference 

Supported module

Leads 

Parameter

  • modulestring, mandatory

    Represents the module API name where you want to update the duplicate check preference. Supported module: Leads. 

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v7/settings/duplicate_check_preference?module=Leads"
-X PUT
-d "input.json"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxd"

Input JSON Keys for "type" : "mapped_module_records" (Contacts)

  • duplicate_check_preferenceJSON object, mandatory

    Represents the details of the duplicate record check preference in the "Contacts" module.

  • typestring, mandatory

    Represents the type of duplicate record check preference. Here, it is "mapped_module_records"  i.e., Contacts.

  • type_configurationsJSON array, mandatory

    Represents the configuration type.

    • field_mappingJSON array, mandatory

      Represents the unique fields mapping in Leads and Contacts modules.

      • current_fieldJSON object, mandatory

        Represents the unique fields in the Leads module that are mapped to the unique fields in the Contacts module.

        • api_namestring, mandatory(either ID or or API name of the unique field is mandatory to map unique fields)

          Represents the API name of the unique field in the Leads module. Use the GET Fields Metadata  to retrieve the API names of the unique fields.

        • idstring, mandatory(either ID or or API name of the unique field is mandatory to map unique fields)

          Represents the ID of the unique field in the Leads module. Use the GET Fields Metadata  to retrieve IDs of the unique fields.

      • mapped_fieldJSON object, mandatory

        Represents the unique fields in the Contacts module to which the unique fields in the Leads module are mapped to.

        • api_namestring, mandatory(either ID or or API name of the unique field is mandatory to map unique fields)

          Represents the API name of the unique field in the Contacts module. Use the GET Fields Metadata  to retrieve the API names of the unique fields.

        • idstring, mandatory(either ID or or API name of the unique field is mandatory to map unique fields)

          Represents the ID of the unique field in the Contacts module. Use the GET Fields Metadata  to retrieve IDs of the unique fields.

    • mapped_moduleJSON object, mandatory

      Represents the details of the mapped module i.e., the module to which the unique fields in the Leads module are mapped to. In this case, Contacts module.

      • api_namestring, mandatory (either ID or or API name of the unique field is mandatory to map unique fields)

        Represents the API name of the mapped module. Use the GET Module Metadata to retrieve the API name of the mapped module. (API name of the Contacts module)

      • idstring, mandatory (either ID or or API name of the unique field is mandatory to map unique fields)

        Represents the ID of the mapped module. Use the GET Module Metadata to retrieve the ID of the mapped module (ID of the Contacts module).

Sample Input to update Duplicate check preference for the "type" : "mapped_module_records"

Copied{
    "duplicate_check_preference": {
        "type": "mapped_module_records",
        "type_configurations": [
            {
                "field_mappings": [
                    {
                        "mapped_field": {
                            "api_name": "Phone", //The email unique field in Contacts has been replaced with the phone unique field and mapped successfully.
                            "name": "Contacts",
                            "id": "2423488000000000449"
                        },
                        "current_field": {
                            "api_name": "Phone",
                            "name": "Leads", //The email unique field in the Leads module has been replaced with the phone unique field and mapped successfully.
                            "id": "2423488000000000563"
                        }
                    }
                ],
                "mapped_module": {
                    "api_name": "Contacts",
                    "name": "Contacts",
                    "id": "2423488000000000129"
                }
            }
        ]
    }
}

Possible Errors

  • INVALID_DATAHTTP 400
    • The module API names given in the input seem to be invalid
      Resolution : Specify a valid module API name. Use the GET Module Metadata API to retrieve module API names.
    • The given field IDs or API names seem to be invalid
      Resolution : Specify valid unique IDs or API names of the unique fields, using the GET - Fields Metadata API.
    • The given field IDs or API names seem to be invalid
      Resolution : Specify the correct IDs or API names of the unique and other fields. Retrieve those details using the GET Module Metadata API and GET Fields Metadata API
    • Invalid data
      Resolutions :
      • Specify valid values for the mapped_field, mapped_module, and current_field keys. Refer to the Sample Input section above.
      • Specify valid data types for the mapped_field, mapped_module, and current_field keys, and their respective fields. Refer to the Sample Input section above.
  • NOT_SUPPORTEDHTTP 400

    This API does not support the specified module 
    Resolution: Specify the supported module. Supported Module : Leads

  • FEATURE_NOT_SUPPORTEDHTTP 400

    Feature not supported for the module specified in the "mapped_module" key 
    Resolution: Please specify a valid module. Supported Module : Contacts

  • NOT_ALLOWEDHTTP 400

    The specified API names or IDs of the unique fields for mapping are not valid unique field API names
    Resolutions:

    • Specify only the unique fields for mapping. 
    • Specify only the IDs or API names of unique fields, using the GET - Fields Metadata API.
  • AMBIGUITY_DURING_PROCESSINGHTTP 400
    • Ambiguity while processing the request
      Resolution: Verify input fields before sending the request. Refer to the Sample Input section above.
    • Two different CRM fields are found
      Resolution: The fields you are trying to map seem to be different. Map only the valid unique fields.
  • DEPENDENT_FIELD_MISSINGHTTP 400

    Dependent fields missing
    Resolutions:

    • Specify all mandatory fields. Refer to the Sample Input section above.
    • To configure the duplicate check option for Contacts or mapped_module_records, it is mandatory to use the "type_configurations" JSON array to map unique fields. Refer to the Sample Input section above.
  • MANDATORY_NOT_FOUND HTTP 400

    Mandatory fields are missing
    Resolution: Specify all mandatory fields. Refer to the Sample Input section above.

  • INVALID_REQUEST_METHODHTTP 400

    The http request method type is not a valid one
    Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to the endpoints section above.

  • EXPECTED_FIELD_MISSINGHTTP 400

    One or more expected fields missing
    Resolution: Specify all required fields. Refer to the Sample Input section above.

  • REQUIRED_PARAM_MISSING HTTP 400

    Required parameter is missing
    Resolution:

    Specify the module API name in which you are trying to update duplicate check option. Supported module : Leads.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: The client does not have a valid scope to update the duplicate record check option. Create a new token with the required scopes. Refer to the scope section above.

  • AUTHENTICATION_FAILUREHTTP 401

    Authentication failed
    Resolution: Pass the access token in the request header of the API call.

  • NO_PERMISSIONHTTP 403

    No permission to access the module
    Resolution: Contact the administrator.

  • INVALID_URL_PATTERNHTTP 404

    Please check if the URL trying to access is a correct one
    Resolution: The request URL specified is incorrect. Specify a valid request URL. Referto the request URL section above.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in the server. Contact support team.

Sample response

Copied{
    "duplicate_check_preference": {
        "code": "SUCCESS",
        "details": {},
        "message": "Field mapping updated successfully.",
        "status": "success"
    }
}