Zoho: Get scoring rule by ID
Zoho scoringRules.getScoringRuleById: arguments, response, policy and SDK examples.
← Scoring rules operations · Get started
Operation zoho.getscoringrulebyid
Provider route: GET /crm/v8/settings/automation/scoring_rules/{ruleId}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["scoringRules"]["getScoringRuleById"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.scoringRules.getScoringRuleById(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_zoho import ZohoIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.scoring_rules.get_scoring_rule_by_id(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.ruleId | string | Required within parent | Maximum length: 20 |
query | object | Optional | Additional keys: not allowed |
query.include_inner_details | string | Optional | Maximum length: 255 |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Get scoring rule by ID — response body — Scoring rule details |
$ (anyOf 2) | null | Alternative |
Referenced models: Get scoring rule by ID — response body — Scoring rule details
Schemas
Section titled “Schemas”23 more schemas are linked from the tables above, on the schema pages.
Get scoring rule by ID — response body — Scoring rule details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Scoring rule details Additional keys: not allowed |
scoring_rules | array | Optional | Represents an array containing the Scoring Rule details returned for the get by ID operation. Maximum items: 1 |
scoring_rules[] | Model | Each item | Expand Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item |
Referenced models: Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item
Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the root element for defining a scoring rule, including layout, fields, custom fields, and scoring configurations. Additional keys: not allowed |
active | boolean | Optional | Indicates whether the Scoring Rule is active (`true`) or inactive (`false`). |
created_by | Model | Optional | Expand Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item created by |
created_time | string | Optional | Scoring rule created time Maximum length: 255 |
custom_fields | JSON | Optional | |
custom_fields (anyOf 1) | array | Alternative | Represents the custom fields configured for this Scoring Rule to hold referenced scores. Maximum items: 6 |
custom_fields (anyOf 1)[] | Model | Each item | Expand Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item custom fields null item |
custom_fields (anyOf 2) | null | Alternative | Represents the custom fields configured for this Scoring Rule to hold referenced scores. Maximum items: 6 |
custom_fields (anyOf 2)[] | Model | Each item | Expand Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item custom fields null item |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | Represents the optional description of the Scoring Rule. This field is nullable. Maximum length: 500 |
description (anyOf 2) | null | Alternative | Represents the optional description of the Scoring Rule. This field is nullable. Maximum length: 500 |
field_rules | array | Optional | Module field based score configuration can be added here Maximum items: 50 |
field_rules[] | Model | Each item | Expand Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item field rules item |
has_signal_rules | boolean | Optional | It defines whether the production scoring rule has any signal rules or not. Applicable only for Leads and Contacts modules rules in Sandbox environment. |
id | string | Optional | Represents the unique ID of the Scoring Rule. Maximum length: 255 |
layout | Model | Optional | Expand Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item layout Layout info. If the rule should be created for all layouts, this field can be skipped or set value as null. |
modified_by | Model | Optional | Expand Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item modified by Scoring rule modified by |
modified_time | JSON | Optional | |
modified_time (anyOf 1) | string | Alternative | Represents the date and time when the Scoring Rule was last modified, in ISO 8601 format. This field is nullable. Maximum length: 255 |
modified_time (anyOf 2) | null | Alternative | Represents the date and time when the Scoring Rule was last modified, in ISO 8601 format. This field is nullable. Maximum length: 255 |
module | Model | Required within parent | Expand Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item module module info (Required) |
name | string | Required within parent | Represents the unique name of the Scoring Rule. Maximum length: 25 |
signal_rules | JSON | Optional | |
signal_rules (anyOf 1) | array | Alternative | Touch points based score configurations; applicable only for Leads and Contacts modules Maximum items: 250 |
signal_rules (anyOf 1)[] | Model | Each item | Expand Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item signal rules null item |
signal_rules (anyOf 2) | null | Alternative | Touch points based score configurations; applicable only for Leads and Contacts modules Maximum items: 250 |
signal_rules (anyOf 2)[] | Model | Each item | Expand Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item signal rules null item |
Referenced models: Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item created by, Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item custom fields null item, Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item field rules item, Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item layout, Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item modified by, Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item module, Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item signal rules null item
Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item created by
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Nested schema for created_by Additional keys: not allowed |
id | string | Optional | Unique numeric ID of the user who created the scoring rule. Maximum length: 25 |
name | string | Optional | Full name of the user who created the scoring rule. Maximum length: 255 |
zuid | string | Optional | Zoho unique ID (ZUID) of the user who created the scoring rule. Maximum length: 255 |
Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item custom fields null item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the configuration for a custom field associated with a Scoring Rule, including the referenced score field. Additional keys: not allowed |
api_name | string | Optional | Represents the API name of the custom field associated with the Scoring Rule. Maximum length: 100 |
field_label | string | Optional | Represents the display name of the custom field. Required when creating a Scoring Rule. Maximum length: 100 |
id | string | Optional | Represents the unique ID of the custom field associated with the Scoring Rule. Maximum length: 25 |
reference_field | Model | Optional | Expand Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item custom fields null item reference field It will hold the referenced score field info. (Required for POST) |
Referenced models: Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item custom fields null item reference field
Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item field rules item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the score configuration for module fields based on specific criteria. Additional keys: not allowed |
criteria | Model | Optional | Expand Get All Custom Views — response body — custom_views / item / access_type: shared, public, only to me, category: public views, other users views, shared with me, created by me criteria value |
id | string | Optional | Represents the primary key of the field rule (Required in UPDATE). Maximum length: 255 |
score | JSON | Optional | |
score (anyOf 1) | integer | Alternative | Represents the points that should be added for the criteria and this is mandatory Format: int32 |
score (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Scoring Rules — scoring Rules get Scoring Rules — response body — info, scoring rules scoring rules item module
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the module associated with a Scoring Rule, including the module API name and unique ID. Additional keys: not allowed |
api_name | string | Optional | Represents the API name of the module associated with the Scoring Rule. Maximum length: 255 |
id | string | Optional | Represents the unique ID of the module associated with the Scoring Rule. Maximum length: 25 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.getscoringrulebyid. Catalog operation: getScoringRuleById. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
No-content response statuses: [204]