Zoho: Submit mass change owner job
Zoho massChangeOwner.massChangeOwner: arguments, response, policy and SDK examples.
← Mass change owner operations · Get started
Operation zoho.masschangeowner
Provider route: POST /crm/v8/{module}/actions/mass_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["massChangeOwner"]["massChangeOwner"]>[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.massChangeOwner.massChangeOwner(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.mass_change_owner.mass_change_owner(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 |
body | object | Required within parent | Specify the details for the mass change owner operation, including the target Custom View, the new owner, an optional territory, and an optional criteria filter. Additional keys: not allowed |
body.criteria | object | Optional | Specify the criteria to filter which records are included in the ownership change. Additional keys: not allowed |
body.criteria.comparator | string | Required within parent | Specify the comparison operator for the criteria. Possible values: equal - Matches records where the field equals the specified value. not_equal - Matches records where the field does not equal the specified value. starts_with - Matches records where the field starts with the specified value. ends_with - Matches records where the field ends with the specified value. greater_than - Matches records where the field is greater than the specified value. less_than - Matches records where the field is less than the specified value. greater_equal - Matches records where the field is greater than or equal to the specified value. less_equal - Matches records where the field is less than or equal to the specified value. between - Matches records where the field value falls within a specified range. not_between - Matches records where the field value falls outside a specified range. One of: equal, ends_with, not_equal, greater_than, less_than, not_between, starts_with, between, less_equal, greater_equal |
body.criteria.field | object | Required within parent | Specify the module field on which the criteria condition applies. Additional keys: not allowed |
body.criteria.field.api_name | string | Required within parent | Specify the API name of the field. Refer to the [Get Fields](fields.yaml#$.paths./settings/fields.get) resource for valid values. Maximum length: 255 |
body.criteria.field.id | string | Optional | Specify the unique ID of the field. Refer to the [Get Fields](fields.yaml#$.paths./settings/fields.get) resource for valid values. Maximum length: 19 |
body.criteria.value | string | Required within parent | Specify the value to compare against the field using the criteria comparator. Maximum length: 255 |
body.cvid | string | Required within parent | Specify the unique ID of the Custom View whose records are to be reassigned. Refer to the [Get Custom Views](custom_views.yaml#$.paths./settings/custom_views.get) resource for valid values. Maximum length: 19 |
body.owner | object | Required within parent | Specify the details of the user to assign as the new owner of the selected records. Additional keys: not allowed |
body.owner.id | string | Required within parent | Specify the unique ID of the user to assign as the new owner. Refer to the [Get Users](users.yaml#$.paths./users.get) resource for valid values. Maximum length: 19 |
body.territory | object | Optional | Specify the territory to use as the source of records for the ownership change. Additional keys: not allowed |
body.territory.id | string | Required within parent | Specify the unique ID of the territory. Refer to the [Get Territories](territories.yaml#$.paths./settings/territories.get) resource for valid values. Maximum length: 19 |
body.territory.include_child | boolean or null | Optional | Specify whether to include records from child territories of the specified territory in the ownership change. Possible values: true - Include records from child territories. false - Restrict to records in the specified territory only. |
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 |
|---|---|---|---|
$ | object | Root | Contains the details of the scheduled ownership change job. Additional keys: not allowed |
data | array | Required within parent | Contains the job scheduling details returned when the mass change owner request is accepted. Maximum items: 1 |
data[] | object | Each item | Represents the details of the scheduled mass change owner job. Additional keys: not allowed |
data[].code | string | Required within parent | Represents the response code for the scheduled job. Possible values: SCHEDULED - The mass change owner job is successfully scheduled. Known values: SCHEDULED |
data[].details | object | Required within parent | Represents the additional details about the scheduled mass change owner job. Additional keys: not allowed |
data[].details.job_id | string | Required within parent | Represents the unique ID of the scheduled mass change owner job. Maximum length: 19 |
data[].message | string | Required within parent | Represents the response message for the scheduled job. Known values: change owner is successfully scheduled |
data[].status | string | Required within parent | Represents the status of the mass change owner operation. Possible values: success - The mass change owner job was successfully scheduled. Known values: success |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.masschangeowner. Catalog operation: massChangeOwner. 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.