Zoho: Change Owner — change Owner change Owner Bulk
Zoho changeOwner.changeOwnerBulk: arguments, response, policy and SDK examples.
← Change owner operations · Get started
Operation zoho.changeownerbulk
Provider route: POST /crm/v8/{module}/actions/change_owner. 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["changeOwner"]["changeOwnerBulk"]>[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.changeOwner.changeOwnerBulk(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.change_owner.change_owner_bulk(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.module | string | Required within parent | Maximum length: 255 |
query | object | Optional | Additional keys: not allowed |
query.ids | string | Optional | Maximum length: 9975 |
query.notify | boolean | Optional | |
query.owner_id | string | Optional | Maximum length: 19 |
query.related_modules | string | Optional | Maximum length: 2000 |
body | object | Required within parent | Specify the record IDs and owner details for the bulk owner change request. Additional keys: not allowed |
body.ids | array | Required within parent | Specify the IDs of the records for which you want to change the owner. Maximum items: 500 |
body.ids[] | string | Each item | Specify a record ID. Maximum length: 19 |
body.notify | boolean or null | Optional | Specify whether to notify the new owner via email when the records are assigned.\nPossible values:\ntrue - The new owner is notified via email.\nfalse - The new owner is not notified via email. |
body.owner | object | Required within parent | Specify the details of the new owner for the records. Additional keys: not allowed |
body.owner.id | string | Required within parent | Specify the user ID of the new owner. Maximum length: 19 |
body.related_modules | array | Optional | Specify the related modules for which you want to transfer record ownership along with the main record. Maximum items: 5 |
body.related_modules[] | Model | Each item | Expand Change Owner — change Owner change Owner Bulk — request body — body related modules item |
Referenced models: Change Owner — change Owner change Owner Bulk — request body — body related modules item
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) | JSON | Alternative | Successful owner change response Additional keys: not allowed |
$ (anyOf 1).data | array | Optional | Data containing the result of the owner change operation Maximum items: 500 |
$ (anyOf 1).data[] | object | Each item | Result of the owner change operation for the record Additional keys: not allowed |
$ (anyOf 1).data[].code | string | Required within parent | Response code indicating success Known values: SUCCESS |
$ (anyOf 1).data[].details | object | Required within parent | Details of the updated record Additional keys: not allowed |
$ (anyOf 1).data[].details.id | string | Required within parent | The ID of the updated record Maximum length: 19 |
$ (anyOf 1).data[].message | string | Required within parent | Success message Maximum length: 500 |
$ (anyOf 1).data[].status | string | Required within parent | Status of the operation Known values: success |
$ (anyOf 2) | JSON | Alternative | Partial bulk change-owner response returned to direct API callers. Additional keys: not allowed |
$ (anyOf 2).data | array | Optional | Per-record outcome array containing a mix of success and error objects. Maximum items: 500 |
$ (anyOf 2).data[] | object | Each item | Per-record outcome entry. Additional keys: allowed |
$ (anyOf 2).data[].code | string | Optional | Outcome code for this record. `SUCCESS` on success; an error code such as `CANNOT_PROCESS`, `NOT_MERGED`, or `CANNOT_PERFORM_ACTION` on failure. Maximum length: 100 |
$ (anyOf 2).data[].status | string | Optional | Status of the operation for this record. Known values: success, error |
$ (anyOf 3) | JSON | Alternative | Partial bulk change-owner response returned to client SDK callers. Additional keys: not allowed |
$ (anyOf 3).data | array | Optional | Per-record outcome array containing a mix of success and error objects. Maximum items: 500 |
$ (anyOf 3).data[] | object | Each item | Per-record outcome entry. Additional keys: allowed |
$ (anyOf 3).data[].code | string | Optional | Outcome code for this record. `SUCCESS` on success; an error code such as `CANNOT_PROCESS`, `NOT_MERGED`, or `CANNOT_PERFORM_ACTION` on failure. Maximum length: 100 |
$ (anyOf 3).data[].status | string | Optional | Status of the operation for this record. Known values: success, error |
Schemas
Section titled “Schemas”Change Owner — change Owner change Owner Bulk — request body — body related modules item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Specify the API name and record ID of a related module record to transfer to the new owner. Additional keys: not allowed |
api_name | string | Optional | Specify the API name of the related module for which the records are transferred.\nPossible values:\n**Tasks**\n**Events**\n**Calls**\n**Contacts**\n**Deals** One of: Tasks, Events, Calls, Contacts, Deals |
id | string | Optional | Specify the record ID of the related module record to transfer to the new owner. Maximum length: 19 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.changeownerbulk. Catalog operation: changeOwnerBulk. 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.