younifyd
Menu

Get related records count

Get related records count

POST/{moduleApiName}/{recordId}/actions/get_related_records_count

Use it in a workflow

  1. Add a step and choose the Zoho CRM connector.
  2. Pick the Get related records count action (under Related Records).
  3. Fill in the fields below, then reference the result from later steps as {{getRelatedRecordsCount.response.data}}.

Request

Path parameters

moduleApiNamestringrequired

Specify the API name of the CRM module that contains the parent record. Use the [Get Modules API](modules.yaml#$.paths./settings/modules.get) to retrieve the module API name and its unique ID.

recordIdstringrequired

Specify the unique ID of the parent record for which you want to count related records. Use the [Get Records API](record.yaml#$.paths./module.get) to retrieve the record ID.

Request body

Enter the body as JSON in the step's Body field.

get_related_records_countarray<object>required

Represents the array of related list count request objects. Each object specifies a related list to query and optional filtering criteria to apply before counting.

related_listobjectrequired2 fields

Represents a related list identified by its API name and unique ID. Used in both the request to specify the target related list and in the response to echo the queried related list.

paramsobject5 fields

Represents optional filtering and selection parameters applied to related records before counting. Includes support for approval status, conversion status, category type, and field-level equality filters.

json
{
  "get_related_records_count": [
    {
      "related_list": {
        "api_name": "string",
        "id": "string"
      },
      "params": {
        "filters": {
          "comparator": "equal",
          "field": {
            "api_name": "api_name30"
          },
          "value": "string"
        },
        "approved": false,
        "converted": false,
        "category": "link",
        "approval_state": "approved"
      }
    }
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{getRelatedRecordsCount.response.data.<field>}}.

get_related_records_countarray<object>

Represents the array of count results, one entry for each related list requested.

countinteger (int32)required

Represents the total number of related records matching the specified criteria.

related_listobjectrequired2 fields

Represents a related list identified by its API name and unique ID. Used in both the request to specify the target related list and in the response to echo the queried related list.

json
{
  "get_related_records_count": [
    {
      "count": 0,
      "related_list": {
        "api_name": "string",
        "id": "string"
      }
    }
  ]
}

Need more? See the Zoho CRM guide for connection setup and behaviour shared by every action.