Scoring Rules
Zoho CRM provides a system for ranking different records in a module governed by rules that you define based on your specific needs. A record's score is a value calculated based on the rules. With this feature, the system assists you in locating the most valuable records. Refer to Multiple Scoring Rules to learn more about scoring rules. Please refer to the limits table for edition-wise limits.
Purpose
To retrieve the list of scoring rules configured in your Zoho CRM organization.
Endpoints
- GET /settings/automation/scoring_rules
- GET /settings/automation/scoring_rules/{rule_ID}
Request Details
Request URL
To retrieve all scoring rules:
{api-domain}/crm/{version}/settings/automation/scoring_rules
To get a specific scoring rule:
{api-domain}/crm/{version}/settings/automation/scoring_rules/{rule_ID}
Supported modules
Leads, Accounts, Contacts, Deals and Custom
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.scoring_rules.{operation_type}
Possible operation types
ALL - Full access to scoring rules 
READ - Get scoring rules
Parameters
- modulestring, optionalSpecify the API name of the CRM module to filter the scoring rules for a particular module. 
- layout_IDstring, optionalSpecify the layout ID to retrieve scoring rules specific to a particular layout. 
- activeBoolean, optionalSpecify whether to fetch only active or inactive scoring rules. By default, both active and inactive scoring rules are included in the response. 
 Possible values:
 active - To fetch only the active scoring rules.
 false - To fetch only the inactive scoring rules.
- namestring, optionalSpecify the name of the scoring rule to retrieve. 
- per_pagenumber, optionalSpecify the number of records to include per page in the response. The default value is 50. 
- pagenumber, optional - Specify the page number to retrieve records from, for paginated results. The default value is 1. 
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/automation/scoring_rules/4876876000000945002"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-X GETResponse JSON
- layoutJSON objectRepresents the layout the rule is associated with, including its ID and name. 
- created_timestringRepresents the date and time the scoring rule was created, in ISO 8601 format. 
- modified_timestringRepresents date and time when the scoring rule was last updated, in ISO 8601 format. 
- field_rulesJSON arrayRepresents the list of field-specific rules defined within the scoring rule. 
- scorenumberRepresents the score assigned based on the specific rule. 
- criteriaJSON objectRepresents conditions or criteria that define the scoring rule logic. 
- idstringRepresents the unique ID of the scoring rule. 
- moduleJSON objectContains the details of the module to which the scoring rule applies. 
- namestringRepresents the unique name of the scoring rule. 
- modified_byJSON objectDetails of the user who last modified the scoring rule, including their name and user ID. 
- activeBooleanIndicates whether the scoring rule is currently active or inactive. 
 Possible values:
 True - The scoring rule is active.
 False - The scoring rule is inactive.
- descriptionstringRepresents the description of the scoring rule. 
- signal_rulesJSON arrayRepresents the signal-specific rules defined for the scoring rule. 
- signalJSON objectDetails of the signal associated with the scoring rule, including its ID and namespace. 
- created_byJSON objectRepresents the user who created the scoring rule, including their name and user ID. 
Possible Errors
- INVALID_REQUEST_METHODHTTP 400The request method is incorrect. 
 Resolution: Use the HTTP GET method to make this API call. Any other request method will result in this error.
- OAUTH_SCOPE_MISMATCHHTTP 401The access token you have used to make this API call does not have the required scope. 
 Resolution: Generate a new access token with the required scopes for this API. Refer to Scope section at the beginning of this page for the list of required scopes.
- NO_PERMISSIONHTTP 403You do not have permission to get scoring rules. 
 Resolution: The user does not have permission to read scoring rules data. Contact your system administrator.
- INVALID_URL_PATTERNHTTP 404The request URL is incorrect. 
 Resolution: Specify a valid request URL. Refer to request URL section at the beginning of this page for more details.
- INTERNAL_ERRORHTTP 500Unexpected and unhandled exception in the server. 
 Resolution: Contact the support team at support@zohocrm.com.
Sample Response
Copied{
    "scoring_rules": [
        {
            "layout": {
                "api_name": "Standard",
                "id": "4876876000000091055"
            },
            "created_time": "2022-04-06T15:19:51+05:30",
            "modified_time": "2022-04-06T16:56:04+05:30",
            "field_rules": [
                {
                    "score": 10,
                    "criteria": {
                        "group_operator": "AND",
                        "group": [
                            {
                                "group_operator": "AND",
                                "group": [
                                    {
                                        "comparator": "equal",
                                        "field": {
                                            "api_name": "Company",
                                            "id": "4876876000000002591"
                                        },
                                        "value": "Zoho"
                                    },
                                    {
                                        "comparator": "equal",
                                        "field": {
                                            "api_name": "Phone",
                                            "id": "4876876000000002601"
                                        },
                                        "value": "123456890"
                                    }
                                ]
                            },
                            {
                                "comparator": "equal",
                                "field": {
                                    "api_name": "Designation",
                                    "id": "4876876000000002597"
                                },
                                "value": "review"
                            }
                        ]
                    },
                    "id": "4876876000000945003"
                },
                {
                    "score": 10,
                    "criteria": {
                        "group_operator": "AND",
                        "group": [
                            {
                                "group_operator": "AND",
                                "group": [
                                    {
                                        "comparator": "contains",
                                        "field": {
                                            "api_name": "Company",
                                            "id": "4876876000000002591"
                                        },
                                        "value": "Zoho"
                                    },
                                    {
                                        "comparator": "equal",
                                        "field": {
                                            "api_name": "Phone",
                                            "id": "4876876000000002601"
                                        },
                                        "value": "123456890"
                                    }
                                ]
                            },
                            {
                                "comparator": "equal",
                                "field": {
                                    "api_name": "Designation",
                                    "id": "4876876000000002597"
                                },
                                "value": "review"
                            }
                        ]
                    },
                    "id": "4876876000000945014"
                }
            ],
            "module": {
                "api_name": "Leads",
                "id": "4876876000000002175"
            },
            "name": "Rule 1",
            "modified_by": {
                "name": "Patricia Boyle",
                "id": "4876876000000327001"
            },
            "active": true,
            "description": "Rule for Module Leads",
            "id": "4876876000000945002",
            "signal_rules": [
                {
                    "score": 10,
                    "id": "4876876000000945016",
                    "signal": {
                        "namespace": "Email_Incoming__s",
                        "id": "4876876000000112019"
                    }
                },
                {
                    "score": 8,
                    "id": "4876876000000945017",
                    "signal": {
                        "namespace": "EmailInsight_Click__s",
                        "id": "4876876000000112023"
                    }
                }
            ],
            "created_by": {
                "name": "Patricia Boyle",
                "id": "4876876000000327001"
            }
        }
    ]
}