Skip to content

Zoho: Submit mass convert job for leads

Zoho massConvert.massConvert: arguments, response, policy and SDK examples.

← Mass convert operations · Get started

Operation zoho.massconvert

Provider route: POST /crm/v8/Leads/actions/mass_convert. 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["massConvert"]["massConvert"]>[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.massConvert.massConvert(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.mass_convert.mass_convert(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyobjectRequired within parentRepresents the request payload for a mass convert operation, containing the lead IDs to convert and optional configuration fields.
Additional keys: not allowed
body.DealsobjectOptionalMust contain the mandatory keys “Deal_Name”, “Stage”, “Closing_Date”, and “Pipeline”(if enabled), besides the other mandatory fields configured for the Deals module. Note that if there are layouts other than Standard, the custom-defined mandatory fields will not be processed while converting the lead.
Additional keys: not allowed
body.Deals.Deal_NamestringRequired within parentSpecify the name of the deal to create for the converted lead.
Maximum length: 255
body.apply_assignment_thresholdbooleanOptionalSpecify whether assignment threshold rules should be applied when assigning the converted records.
Possible values:
true - Apply assignment threshold rules (default).
false - Skip assignment threshold rules.
body.assign_toobjectOptionalSpecify the user to assign the converted records to. Refer to the [Get Users](users.yaml#$.paths./users.get) resource for valid values.
Additional keys: not allowed
body.assign_to.idstringRequired within parentSpecify the ID of the user to assign the converted records to. Refer to the [Get Users](users.yaml#$.paths./users.get) resource for valid values.
Maximum length: 255
body.carry_over_tagsarrayOptionalThe name and ID of the module you want to associate the tags to while converting the lead. For example, if you give contacts in this array, the tags of the lead will be carried over to the contact that the lead is converted to. Use the [Get Modules API](modules.yaml#$.paths./settings/modules.get) to get the ID of the module. Note that you can carry over tags to Contacts, Deals, and Accounts.
Maximum items: 3
body.carry_over_tags[]objectEach itemEach object specifies the module API name and ID for each tag to carry over to the converted record.
Additional keys: not allowed
body.carry_over_tags[].api_namestringRequired within parentSpecify the API name of the module to carry the tags over to. Refer to the [Get Modules](modules.yaml#$.paths./settings/modules.get) resource for valid values.
Maximum length: 100
body.carry_over_tags[].idstringRequired within parentSpecify the ID of the module to carry the tags over to. Refer to the [Get Modules](modules.yaml#$.paths./settings/modules.get) resource for valid values.
Format: int64
Maximum length: 255
body.idsarrayRequired within parentThe record IDs of the leads you want to convert. Use the [Get Records API](record.yaml#$.paths./{module}.get) to get the record IDs. Note that you can give a maximum of up to 50 records IDs in this array.
Maximum items: 50
body.ids[]stringEach itemEach object specifies a lead record ID to include in the mass convert job.
Maximum length: 255
body.move_attachments_toobjectOptionalThe name and ID of the module you want to move the attachments of the lead to after converting. Use the Modules API to get the ID of the module. Note that you can move the attachments to either Contacts, Deals, or Accounts.
Additional keys: not allowed
body.move_attachments_to.api_namestringRequired within parentSpecify the API name of the module to move the lead’s attachments to. Refer to the [Get Modules](modules.yaml#$.paths./settings/modules.get) resource for valid values.
Maximum length: 100
body.move_attachments_to.idstringRequired within parentSpecify the ID of the target module to move the lead’s attachments to.
Format: int64
Maximum length: 255
body.portal_user_typeobjectOptionalSpecify the portal user type for the contact created from the converted lead. Refer to the [Get Portal User Types](portal_user_type.yaml#$.paths./settings/portals/{portal}/user_type/users.get) resource for valid values.
Additional keys: not allowed
body.portal_user_type.idstringRequired within parentSpecify the ID of the portal user type to assign to the converted contact. Refer to the [Get Portal User Types](portal_user_type.yaml#$.paths./settings/portals/{portal}/user_type/users.get) resource for valid values.
Format: int64
Maximum length: 255
body.related_modulesarrayOptionalThe API name and ID of the modules such as Tasks, Meetings, or Calls. If the lead has one or all of these related records, the owner of these records will be changed to the user given in the “assign_to” key.
Use the [Get Modules API](modules.yaml#$.paths./settings/modules.get) to get the ID of the module.
Maximum items: 3
body.related_modules[]objectEach itemEach object specifies the API name and ID of a related module to include in the conversion.
Additional keys: not allowed
body.related_modules[].api_namestringRequired within parentSpecify the API name of the related module. Refer to the [Get Modules](modules.yaml#$.paths./settings/modules.get) resource for API name.
Maximum length: 100
body.related_modules[].idstringRequired within parentSpecify the ID of the related module. Refer to the [Get Modules](modules.yaml#$.paths./settings/modules.get) resource for ID.
Format: int64
Maximum length: 255

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 returned when the mass convert job is successfully scheduled.
Additional keys: not allowed
codestringRequired within parentRepresents the response code indicating the job has been scheduled.
Possible values:
SCHEDULED - The mass convert job has been accepted and scheduled for execution.

Known values: SCHEDULED
Maximum length: 50
detailsobjectRequired within parentRepresents additional details about the scheduled mass convert job, including the job identifier.
Additional keys: not allowed
details.job_idstringRequired within parentRepresents the unique identifier of the scheduled mass convert job, returned for use in subsequent job status requests.
Maximum length: 255
messagestringRequired within parentRepresents the message describing the outcome of the mass convert job scheduling.
Maximum length: 512
statusstringRequired within parentRepresents the status category of the response.
Possible values:
success* - The mass convert job was scheduled successfully.

Known values: success
Maximum length: 50

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