Skip to content

Zoho: Module Record Count

Zoho recordCount.getRecordCount: arguments, response, policy and SDK examples.

← Record count operations · Get started

Operation zoho.getrecordcount

Provider route: GET /crm/v8/{moduleApiName}/actions/count. Alter supplies the connection’s credentials and routing.

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["recordCount"]["getRecordCount"]>[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.recordCount.getRecordCount(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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.record_count.get_record_count(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.moduleApiNamestringRequired within parentThe API name of the module for which to retrieve the record count (e.g., `Leads`, `Accounts`).
Maximum length: 5000
queryobjectOptionalAdditional keys: not allowed
query.emailstringOptionalThe email address to filter records by. Note that special characters must be URL-encoded (e.g., `p%2Bboyle@example.com` for `p+boyle@example.com`).
Maximum length: 3000
query.phonestringOptionalThe phone number to filter records by.
Maximum length: 3000
query.wordstringOptionalThe word to filter records by.
Maximum length: 3000
query.cvidstringOptionalThe Custom View ID to filter records by.
Maximum length: 3000
query.criteriastringOptionalSearch criteria string with field API name, operator, and value
Maximum length: 3000
query.filtersModelOptionalExpand Related Records — request body — query filters
query.include_filtersstringOptionalMaximum length: 50
query.cross_filtersstringOptionalMaximum length: 3000
query.convertedstringOptionalSet to true to count only converted leads; false to count only unconverted leads.
One of: true, false, both
query.approvedstringOptionalSet to true to count only converted leads; false to count only unconverted leads.
One of: true, false, both
query.pageintegerOptionalThe page number for pagination.
Default: 1
Format: int32
Minimum: 1
query.per_pageintegerOptionalNumber of records per page for pagination.
Default: 200
Format: int32
Maximum: 200
Minimum: 1
query.typestringOptionalSpecifies the user type to filter records by.
One of: AllUsers, ActiveUsers, DeactiveUsers, ConfirmedUsers, ConfirmedReportingUsers, NotConfirmedUsers, DeletedUsers, ActiveConfirmedUsers, AdminUsers, ActiveConfirmedAdmins, CurrentUser

Referenced models: Related Records — request body — query filters

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRootRepresents the response body containing the total number of records matching the specified filter criteria.
Additional keys: not allowed
countJSONRequired within parent
count (anyOf 1)integerAlternativeRepresents the total number of records matching the specified filter criteria. Always returned in the response.
Format: int32
count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

10 more schemas are linked from the tables above, on the schema pages.

Related Records — request body — query filters
FieldTypePresenceDescription and constraints
$JSONRootRepresents the top-level filter criterion for data selection, supporting both simple field-based filters and complex grouped filters with logical operators.
$ (anyOf 1)ModelAlternativeExpand Related Records — request body — query filters value
$ (anyOf 2)ModelAlternativeExpand Related Records — request body — query / filters / group_operator: AND, OR, and, or

Referenced models: Related Records — request body — query / filters / group_operator: AND, OR, and, or, Related Records — request body — query filters value

Related Records — request body — query / filters / group_operator: AND, OR, and, or
FieldTypePresenceDescription and constraints
$objectRootRepresents a grouped filter criterion containing multiple filter conditions evaluated with a logical operator. Supports recursive nesting for complex filtering logic.
Additional keys: not allowed
grouparrayRequired within parentContains an array of filter conditions grouped together and evaluated with the specified logical operator.
Maximum items: 25
Minimum items: 2
group[]JSONEach item
group[] (anyOf 1)ModelAlternativeExpand Related Records — request body — query filters value
group[] (anyOf 2)ModelAlternativeExpand Related Records — request body — query / filters / group_operator: AND, OR, and, or
group_operatorstringRequired within parentRepresents the logical operator applied between the filter conditions in the group.
Possible values:
AND - All conditions in the group must be satisfied.
OR - At least one condition in the group must be satisfied.
and - Equivalent to AND; all conditions in the group must be satisfied.
or - Equivalent to OR; at least one condition in the group must be satisfied.
One of: AND, OR, and, or

Referenced models: Related Records — request body — query / filters / group_operator: AND, OR, and, or, Related Records — request body — query filters value

Related Records — request body — query filters value
FieldTypePresenceDescription and constraints
$JSONRootRepresents a simple field-based filter criterion that dispatches to the appropriate comparator-specific schema. The equal and not_equal comparators support scalar or array values; text comparators support scalar or array strings; ordering comparators require a scalar; between and not_between comparators require a two-element array; in and not_in comparators require an array of primitives; and include_all, include_any, exclude_all, and exclude_any comparators require an array of lookup objects and apply only when the field's data_type is multiuserlookup or multiselectlookup.
$ (anyOf 1)ModelAlternativeExpand Related Records — request body — query filters value value
$ (anyOf 2)ModelAlternativeExpand Related Records — request body — query / filters / value / comparator: like, not like, starts with, ends with, contains, not contains, type: merge field, pre defined, value, field
$ (anyOf 3)ModelAlternativeExpand Related Records — request body — query / filters / value / comparator: less than, less equal, greater than, greater equal, type: merge field, pre defined, value, field
$ (anyOf 4)ModelAlternativeExpand Related Records — request body — query / filters / value / comparator: between, not between, type: merge field, pre defined, value, field
$ (anyOf 5)ModelAlternativeExpand Related Records — request body — query / filters / value / comparator: in, not in, type: merge field, pre defined, value, field
$ (anyOf 6)ModelAlternativeExpand Related Records — request body — query / filters / value / comparator: include all, include any, exclude all, exclude any, type: merge field, pre defined, value, field

Referenced models: Related Records — request body — query / filters / value / comparator: between, not between, type: merge field, pre defined, value, field, Related Records — request body — query filters value value, Related Records — request body — query / filters / value / comparator: include all, include any, exclude all, exclude any, type: merge field, pre defined, value, field, Related Records — request body — query / filters / value / comparator: less than, less equal, greater than, greater equal, type: merge field, pre defined, value, field, Related Records — request body — query / filters / value / comparator: in, not in, type: merge field, pre defined, value, field, Related Records — request body — query / filters / value / comparator: like, not like, starts with, ends with, contains, not contains, type: merge field, pre defined, value, field

Related Records — request body — query / filters / value / comparator: between, not between, type: merge field, pre defined, value, field
FieldTypePresenceDescription and constraints
$objectRootRepresents a filter criterion for the between and not_between comparators. The value must be an array of exactly two elements — [lower_bound, upper_bound]. The value type is determined by the field's data_type: use SimpleFilterCriterionValueString for date or datetime fields, and SimpleFilterCriterionValueNumber for integer, currency, or double fields. Resolve the data_type from the field's FieldSchema. For formula fields, use formula.return_type as the effective data_type; for rollup_summary fields, use rollup_summary.return_type.
Additional keys: not allowed
comparatorstringRequired within parentRepresents the range comparison operator applied to the criterion, indicating whether the field value falls within or outside the specified bounds.
Possible values:
between - Matches records where the field value falls within the specified range.
not_between - Matches records where the field value falls outside the specified range.
One of: between, not_between
fieldJSONRequired within parentRepresents the target field definition to which the range filter criterion is applied, conforming to the base field structure.
field (allOf 1)ModelAll variants applyExpand Related Records — request body — query / filters / value / comparator: in, not in, type: merge field, pre defined, value, field field api name, id
field (allOf 2)objectAll variants applyRepresents the field reference constraint that requires the api_name property to be present for the range filter criterion.
Additional keys: allowed
typestringOptionalIndicates the value resolution mode of the criterion, distinguishing whether the filter value is a literal value, a merge field reference, a predefined system variable, or another field reference.
Possible values:
value - The value is a direct literal.
merge_field - The value is a merge field reference.
pre_defined - The value is a predefined system variable placeholder.
field - The value references another field.
Default: value
One of: merge_field, pre_defined, value, field
valuearrayRequired within parentContains the two boundary values — [lower_bound, upper_bound] — against which the field is evaluated for the between or not_between comparator.
Maximum items: 2
Minimum items: 2
value[]JSONEach item
value[] (anyOf 1)stringAlternativeRepresents a string filter criterion value applicable to fields with a data_type of text, textarea, email, phone, website, autonumber, picklist, multiselectpicklist, date, or datetime, as well as any data_type not explicitly covered by SimpleFilterCriterionValueNumber, SimpleFilterCriterionValueBoolean, SimpleFilterCriterionValueObjectRequest, SimpleFilterCriterionValueObjectResponse, or the multiselect lookup value schemas.
Maximum length: 255
value[] (anyOf 2)numberAlternativeRepresents a numeric filter criterion value applicable to fields with a data_type of integer, currency, or double.

Referenced models: Related Records — request body — query / filters / value / comparator: in, not in, type: merge field, pre defined, value, field field api name, id

Related Records — request body — query filters value value
FieldTypePresenceDescription and constraints
$JSONRootRepresents an equality filter criterion that dispatches to either the EqualFilterCriterionRequest or NotEqualFilterCriterionRequest schema based on the comparator value.
$ (anyOf 1)ModelAlternativeExpand Related Records — request body — query / filters / value / value / comparator: equal, type: merge field, pre defined, value, field
$ (anyOf 2)ModelAlternativeExpand Related Records — request body — query / filters / value / value / comparator: not equal, type: merge field, pre defined, value, field

Referenced models: Related Records — request body — query / filters / value / value / comparator: equal, type: merge field, pre defined, value, field, Related Records — request body — query / filters / value / value / comparator: not equal, type: merge field, pre defined, value, field

Related Records — request body — query / filters / value / comparator: in, not in, type: merge field, pre defined, value, field field api name, id
FieldTypePresenceDescription and constraints
$objectRootRepresents the base field reference used in filter operations, containing minimal required properties. The field's data_type is not part of this object; resolve it from the corresponding FieldSchema. For formula fields, use formula.return_type as the effective data_type; for rollup_summary fields, use rollup_summary.return_type.
Additional keys: allowed
api_namestringOptionalRepresents the API name of the field used for filter application. Supports relationship notation, for example, Deals__r.Stage.
idstringOptionalRepresents the unique ID of the field used for filter operations.
Format: int64

SDK function policy ID: zoho.getrecordcount. Catalog operation: getRecordCount. 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.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.