> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Zoho CRM: README

> Get Related Records Count. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Get Related Records Count.

<Info>
  Tool ID: `zoho_crm_get_related_records_count_get_related_records_count`
</Info>

## Run this action

This action has conditional or dynamic input fields that cannot be represented by a reliable static example.

Inspect the live contract before executing it:

```bash theme={null}
deepline tools get zoho_crm_get_related_records_count_get_related_records_count --json
```

## Example response

The static output schema is not detailed enough to generate a reliable example. Use `deepline tools get zoho_crm_get_related_records_count_get_related_records_count --json` for the complete live contract.

## Input reference

Request payload containing an array of related list count specifications.

| Name                                | Type     | Required | Default | Details                                                                                                                                                                                                                      |
| ----------------------------------- | -------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.moduleApiName`             | `string` | Yes      | —       | The API name of the CRM module containing the parent record. Common values include 'Contacts', 'Leads', 'Deals', 'Accounts', 'Services\_\_s', etc. Minimum length: 1. Maximum length: 100. Pattern: `^[A-Za-z0-9_]+$`.       |
| `payload.recordId`                  | `string` | Yes      | —       | The unique identifier of the parent record for which to count related records. This is typically a numeric ID or UUID depending on the CRM configuration. Minimum length: 1. Maximum length: 50. Pattern: `^[0-9a-fA-F-]+$`. |
| `payload.get_related_records_count` | `array`  | Yes      | —       | Array of related list count requests. Each item specifies a related list and optional filtering criteria. Minimum items: 1. Maximum items: 20.                                                                               |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Request payload containing an array of related list count specifications.",
    "properties": {
      "moduleApiName": {
        "type": "string",
        "description": "The API name of the CRM module containing the parent record. Common values include 'Contacts', 'Leads', 'Deals', 'Accounts', 'Services__s', etc.",
        "minLength": 1,
        "maxLength": 100,
        "pattern": "^[A-Za-z0-9_]+$"
      },
      "recordId": {
        "type": "string",
        "description": "The unique identifier of the parent record for which to count related records. This is typically a numeric ID or UUID depending on the CRM configuration.",
        "minLength": 1,
        "maxLength": 50,
        "pattern": "^[0-9a-fA-F-]+$"
      },
      "get_related_records_count": {
        "type": "array",
        "description": "Array of related list count requests. Each item specifies a related list and optional filtering criteria.",
        "minItems": 1,
        "maxItems": 20,
        "items": {
          "type": "object",
          "description": "Specifies a related list to count and optional filtering criteria.",
          "properties": {
            "related_list": {
              "type": "object",
              "description": "Identifies a specific related list by its API name and unique identifier.",
              "properties": {
                "api_name": {
                  "type": "string",
                  "description": "The API name of the related list (e.g., 'Contacts', 'Deals', 'Tasks').",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[A-Za-z0-9_]+$"
                },
                "id": {
                  "type": "string",
                  "description": "The unique identifier of the related list definition.",
                  "minLength": 1,
                  "maxLength": 20,
                  "pattern": "^[0-9]+$"
                }
              },
              "required": [
                "api_name",
                "id"
              ],
              "additionalProperties": false
            },
            "params": {
              "type": "object",
              "description": "Optional filtering and selection parameters to apply before counting records.",
              "properties": {
                "approved": {
                  "type": "boolean",
                  "description": "Filter to include only approved records when counting."
                },
                "filters": {
                  "type": "object",
                  "description": "Field-based filter criteria to apply before counting records.",
                  "properties": {
                    "comparator": {
                      "type": "string",
                      "description": "The comparison operator to use for filtering.",
                      "enum": [
                        "equal"
                      ]
                    },
                    "field": {
                      "type": "object",
                      "description": "Specifies the field to filter on when counting related records.",
                      "properties": {
                        "api_name": {
                          "type": "string",
                          "description": "The API name of the field to filter on.",
                          "minLength": 1,
                          "maxLength": 100,
                          "pattern": "^[A-Za-z0-9_]+$"
                        }
                      },
                      "required": [
                        "api_name"
                      ],
                      "additionalProperties": false
                    },
                    "value": {
                      "type": "string",
                      "description": "The value to compare the field against.",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  },
                  "required": [
                    "comparator",
                    "field",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "converted": {
                  "type": "boolean",
                  "description": "Filter to include only converted records when counting (applicable to Leads)."
                },
                "category": {
                  "type": "string",
                  "description": "Filter by record category type.",
                  "enum": [
                    "link",
                    "files"
                  ]
                },
                "approval_state": {
                  "type": "string",
                  "description": "Filter by approval workflow state.",
                  "enum": [
                    "approved"
                  ]
                }
              },
              "required": [
                "filters"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "related_list"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "moduleApiName",
      "recordId",
      "get_related_records_count"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                    | Type     | Required | Default | Details                                                                                |
| --------------------------------------- | -------- | -------- | ------- | -------------------------------------------------------------------------------------- |
| `result.data`                           | `object` | Yes      | —       | Successful response containing count results for the requested related lists.          |
| `result.data.get_related_records_count` | `array`  | Yes      | —       | Array of count result arrays, one entry per requested related list. Maximum items: 20. |
| `result.meta`                           | `object` | No       | —       | Additional response metadata (status, paging).                                         |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Successful response containing count results for the requested related lists.",
        "properties": {
          "get_related_records_count": {
            "type": "array",
            "description": "Array of count result arrays, one entry per requested related list.",
            "maxItems": 20,
            "items": {
              "type": "array",
              "description": "Wrapper array containing count result objects.",
              "maxItems": 2147483647,
              "items": {
                "type": "object",
                "description": "The count result for a specific related list.",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The total number of related records matching the specified criteria.",
                    "minimum": 0,
                    "format": "int32"
                  },
                  "related_list": {
                    "type": "object",
                    "description": "Identifies a specific related list by its API name and unique identifier.",
                    "properties": {
                      "api_name": {
                        "type": "string",
                        "description": "The API name of the related list (e.g., 'Contacts', 'Deals', 'Tasks').",
                        "minLength": 1,
                        "maxLength": 100,
                        "pattern": "^[A-Za-z0-9_]+$"
                      },
                      "id": {
                        "type": "string",
                        "description": "The unique identifier of the related list definition.",
                        "minLength": 1,
                        "maxLength": 20,
                        "pattern": "^[0-9]+$"
                      }
                    },
                    "required": [
                      "api_name",
                      "id"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "count",
                  "related_list"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "required": [
          "get_related_records_count"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
