Skip to content

Zoho: Convert a Lead

Zoho convert.convertLead: arguments, response, policy and SDK examples.

← Convert operations · Get started

Operation zoho.convertlead

Provider route: POST /crm/v8/Leads/{leadId}/actions/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["convert"]["convertLead"]>[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.convert.convertLead(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.convert.convert_lead(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.leadIdstringRequired within parentFormat: int64
bodyModelRequired within parentExpand Convert a Lead — request body — body

Referenced models: Convert a Lead — request body — body

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

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Convert a Lead — response body — Wrapper for successful conversion response
$ (anyOf 2)JSONAlternativeRepresents the response payload for scheduled conversion processing or validation-level errors.
$ (anyOf 2) (anyOf 1)ModelAlternativeExpand Convert a Lead — response body — value Wrapper for scheduled conversion response
$ (anyOf 2) (anyOf 2)ModelAlternativeExpand Convert a Lead — response body — value Wrapper for validation error responses

Referenced models: Convert a Lead — response body — value Wrapper for scheduled conversion response, Convert a Lead — response body — Wrapper for successful conversion response, Convert a Lead — response body — value Wrapper for validation error responses

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

Convert a Lead — request body — body
FieldTypePresenceDescription and constraints
$objectRootWrapper object containing array of conversion requests
Additional keys: not allowed
dataarrayRequired within parentArray of lead conversion configurations
Maximum items: 100
data[]ModelEach itemExpand Convert a Lead — request body — body data item

Referenced models: Convert a Lead — request body — body data item

Convert a Lead — response body — value Wrapper for scheduled conversion response
FieldTypePresenceDescription and constraints
$objectRootWrapper for scheduled conversion response
Additional keys: not allowed
dataarrayRequired within parentArray containing the scheduled job information
Maximum items: 1
data[]ModelEach itemExpand Convert a Lead — response body — value Wrapper for scheduled conversion response data item

Referenced models: Convert a Lead — response body — value Wrapper for scheduled conversion response data item

Convert a Lead — response body — Wrapper for successful conversion response
FieldTypePresenceDescription and constraints
$objectRootWrapper for successful conversion response
Additional keys: not allowed
dataarrayRequired within parentArray of conversion results
Maximum items: 100
data[]ModelEach itemExpand Convert a Lead — response body — Wrapper for successful conversion response data item

Referenced models: Convert a Lead — response body — Wrapper for successful conversion response data item

Convert a Lead — response body — value Wrapper for validation error responses
FieldTypePresenceDescription and constraints
$objectRootWrapper for validation error responses
Additional keys: not allowed
dataarrayRequired within parentArray of validation errors
Maximum items: 100
data[]ModelEach itemExpand Convert a Lead — response body — value Wrapper for validation error responses data item

Referenced models: Convert a Lead — response body — value Wrapper for validation error responses data item

Convert a Lead — request body — body data item
FieldTypePresenceDescription and constraints
$objectRootConfiguration for converting a single lead
Additional keys: not allowed
DealsModelOptionalExpand Convert a Lead — request body — body data item Deals
add_to_existing_recordbooleanOptionalWhen true, associates the Lead with an existing Account or Contact instead of creating duplicates.
assign_toobjectOptionalAssigns a record owner for the new Contact and Account after lead conversion. It ensures that the converted lead is assigned to a specific user in Zoho CRM. Use the [Users API](users.yaml#$.paths./users/bulk.get) to retrieve valid User IDs.
Additional keys: not allowed
assign_to.idstringRequired within parentZoho CRM user ID (int64 as string)
Maximum length: 20
carry_over_tagsobjectOptionalConfiguration for carrying over tags from the Lead to converted records
Additional keys: not allowed
carry_over_tags.AccountsobjectOptionalTag carryover settings for Account records
Additional keys: allowed
carry_over_tags.ContactsobjectOptionalTag carryover settings for Contact records.
Additional keys: allowed
carry_over_tags.DealsobjectOptionalTag carryover settings for Deal records
Additional keys: allowed
defaultJSONOptional
notify_lead_ownerbooleanOptionalIf true, sends email notification to the Lead owner about the conversion. Default is false.
Default: false
notify_new_entity_ownerbooleanOptionalIf true, notifies the owner(s) of newly created Contact, Account, or Deal records. Default is false.
Default: false
overwritebooleanOptionalDetermines whether to overwrite the Account Name in a Contact when converting a Lead.
For example, If a Contact is already linked to an Account but the Lead’s Company name is different, enabling this option will update the Contact’s Account to match the Lead’s Company.
**Possible values:**
false (default) : Keeps the existing Account Name in the Contact unchanged.
true : Updates the Contact’s associated Account Name if it differs from the Company name in the Lead.

Referenced models: Convert a Lead — request body — body data item Deals

Convert a Lead — response body — value Wrapper for scheduled conversion response data item
FieldTypePresenceDescription and constraints
$objectRootLead conversion scheduled for background processing
Additional keys: not allowed
codestringRequired within parentStatus code indicating conversion was scheduled
Known values: SCHEDULED
detailsobjectRequired within parentJob details
Additional keys: not allowed
details.job_idstringRequired within parentUnique job identifier
Maximum length: 20
messagestringRequired within parentMessage that summarizes the scheduling result for the lead conversion request.
Maximum length: 500
statusstringRequired within parentOverall status
Known values: success
Convert a Lead — response body — Wrapper for successful conversion response data item
FieldTypePresenceDescription and constraints
$objectRootSuccessful lead conversion result
Additional keys: not allowed
codestringRequired within parentStatus code indicating successful conversion
Known values: SUCCESS
detailsModelRequired within parentExpand Convert a Lead — response body — Wrapper for successful conversion response data item details
messagestringRequired within parentMessage that summarizes the outcome of the lead conversion request.
Maximum length: 500
statusstringRequired within parentOverall status of the conversion operation
Known values: success

Referenced models: Convert a Lead — response body — Wrapper for successful conversion response data item details

Convert a Lead — response body — value Wrapper for validation error responses data item
FieldTypePresenceDescription and constraints
$objectRootValidation error details
Additional keys: not allowed
codestringRequired within parentError code identifying the type of validation failure
Known values: MANDATORY_NOT_FOUND, MAPPING_MISMATCH, INVALID_DATA, DUPLICATE_DATA, CANNOT_PERFORM_ACTION, NOT_ALLOWED, NOT_REVIEWED
detailsobjectRequired within parentAdditional error context and affected field information
Additional keys: allowed
details.api_namestringOptionalAPI name of the affected field
Maximum length: 100
details.expected_data_typestringOptionalExpected data type for the field
Maximum length: 50
details.json_pathstringOptionalJSONPath to the affected field in the request
Maximum length: 200
details.mapped_fieldstringOptionalName of the field that has a mapping relationship
Maximum length: 100
details.maximum_lengthJSONOptional
details.maximum_length (anyOf 1)integerAlternativeMaximum allowed length for the field
Format: int32
details.maximum_length (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
messagestringRequired within parentMessage that explains why the lead conversion request failed validation.
Maximum length: 500
statusstringRequired within parentError status indicator
Known values: error
Convert a Lead — request body — body data item Deals
FieldTypePresenceDescription and constraints
$objectRootDeal record configuration for lead conversion
Additional keys: not allowed
$move_attachmentsbooleanOptionalIf true, moves attachments from the Lead to the Deal
AmountnumberOptionalExpected revenue amount for the Deal
Format: double
Campaign_SourcestringOptionalCampaign source associated with this Deal
Maximum length: 100
Closing_DatestringRequired within parentExpected closing date for the Deal (ISO 8601 date format: YYYY-MM-DD)
Format: date
Contact_RolestringOptionalRepresents the **role** of the Contact in this Deal
Maximum length: 50
Deal_NamestringRequired within parentSpecify the name of the Deal
Maximum length: 120
DescriptionstringOptionalDetailed description of the Deal
Maximum length: 32000
Lead_SourcestringOptionalSource from which the Lead originated
Maximum length: 100
Next_StepstringOptionalNext action or milestone for the Deal
Maximum length: 200
PipelinestringRequired within parentIndicates the **sales pipeline** for the Deal. Must match an existing pipeline in the CRM.
Maximum length: 100
ProbabilityintegerOptionalWin probability percentage (0-100)
Format: int32
Maximum: 100
Minimum: 0
StagestringRequired within parentCurrent stage of the Deal within the specified Pipeline. Must be valid for the chosen Pipeline.
Maximum length: 100
TypestringOptionalType of Deal (e.g., New Business, Existing Business)
Maximum length: 50

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