Developer API Help

convertLead Method

Purpose

You can use this method to convert lead to potential, account and contact.

For lead conversion process, see Convert Leads to Other Sales Records in User Manual.

Request URL

XML Format:
https://crm.zoho.com/crm/private/xml/Leads/convertLead?authtoken=Auth Token&scope=crmapi &leadId=entity Id&xmlData=POTENTIALXMLDATA

JSON Format:
https://crm.zoho.com/crm/private/json/Leads/convertLead?authtoken=Auth Token&scope=crmapi &leadId=entity Id&xmlData=POTENTIALXMLDATA

Request Parameters

Parameter Data Type Description
authtoken* String Encrypted alphanumeric string to authenticate your Zoho credentials.
scope* String Specify the value as crmapi
leadId* String Specify unique ID of the lead
xmlData* XML Specify fields and corresponding values
newFormat Integer newFormat=1: To exclude fields with "null" values while inserting data from your CRM account.
newFormat=2:To include fields with "null" values while inserting data from your CRM account.
version Integer version = 1: (Default value) This will fetch responses based on the earlier API implementation i.e prior to the enhancements made.
version = 2: This will fetch responses based on the latest API implementation.

* - Mandatory parameter

Note:

  • Refer the Release Notes page to learn more about enhancements made in the API implementation.

Sample XML to convert a Lead into an Account, Contact and Potential

<Potentials>
<row no="1">
<option val="createPotential">true</option>
<option val="assignTo">sample@zoho.com</option>
<option val="notifyLeadOwner">true</option>
<option val="notifyNewEntityOwner">true</option>
</row>
<row no="2">
<FL val="Potential Name">Samplepotential</FL>
<FL val="Closing Date">12/21/2009</FL><FL val="Potential Stage">Closed Won</FL>
<FL val="Contact Role">Purchasing</FL>
<FL val="Amount">3432.23</FL>
<FL val="Probability">100</FL>
</row>
</Potentials>

Note:

  • In this XML, <row no="2"> is mandatory ONLY if the value for "createPotential" is set to true.If the value for "createPotential" is set to false, a Potential will NOT be created on conversion of the Lead.

Sample XML to convert a Lead without creating a Potential

<Potentials>
<row no="1">
<option val="createPotential">false</option>
<option val="assignTo">sample@zoho.com</option>
<option val="notifyLeadOwner">true</option>
<option val="notifyNewEntityOwner">true</option>
</row>
</Potentials>

Top