ODBC Driver for Certinia

Build 24.0.9060

ConvertLead

Converts a Lead into an Account, Contact, or (optionally) an Opportunity.

Note: This procedure makes use of indexed parameters. Indexed parameters facilitate providing multiple instances a single parameter as inputs for the procedure.

Suppose there is an input parameter named Param#. To input multiple instances of an indexed parameter like this, execute:

EXEC ProcedureName Param#1 = "value1", Param#2 = "value2", Param#3 = "value3"

In the table below, indexed parameters are denoted with a '#' character at the end of their names.

Input

Name Type Description
AccountId# String ID of the Account into which the lead will be merged. Required only when updating an existing account, including person accounts. If no accountID is specified, then the API creates a new account. To create a new account, the client application must be logged in with sufficient access rights. To merge a lead into an existing account, the client application must be logged in with read/write access to the specified account. The account name and other existing data are not overwritten.
ContactId# String ID of the Contact into which the lead will be merged (this contact must be associated with the specified accountId, and an accountId must be specified). Required only when updating an existing contact. If you are converting a lead into a person account, do not specify the contactId or an error will result. Specify only the accountId of the person account. If no contactID is specified, then the API creates a new contact that is implicitly associated with the Account. To create a new contact, the client application must be logged in with sufficient access rights. To merge a lead into an existing contact, the client application must be logged in with read/write access to the specified contact. The contact name and other existing data are not overwritten (unless overwriteLeadSource is set to true, in which case only the LeadSource field is overwritten).
ConvertedStatus# String Valid LeadStatus value for a converted lead. Required. To obtain the list of possible values, the client application queries the LeadStatus object. e.g: SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true
DoNotCreateOpportunity# String Specifies whether to create an Opportunity during lead conversion (false, the default) or not (true). Set this flag to true only if you do not want to create an opportunity from the lead. An opportunity is created by default.
LeadId# String ID of the Lead to convert. Required.
OpportunityName# String Name of the opportunity to create. If no name is specified, then this value defaults to the company name of the lead. The maximum length of this field is 80 characters. If doNotCreateOpportunity argument is true, then no Opportunity is created and this field must be left blank; otherwise, an error is returned.
OverwriteLeadSource# String Specifies whether to overwrite the LeadSource field on the target Contact object with the contents of the LeadSource field in the source Lead object (true), or not (false, the default). To set this field to true, the client application must specify a contactId for the target contact.
OwnerId# String Specifies the ID of the person to own any newly created account, contact, and opportunity. If the client application does not specify this value, then the owner of the new object will be the owner of the lead. Not applicable when merging with existing objects-if an ownerId is specified, the API does not overwrite the ownerId field in an existing account or contact.
SendNotificationEmail# String Specifies whether to send a notification email to the owner specified in the ownerId (true) or not (false, the default).

The default value is FALSE.

Result Set Columns

Name Type Description
AccountId String ID of the new Account (if a new account was specified) or the ID of the account specified when convertLead() was invoked.
ContactId String ID of the new Contact (if a new contact was specified) or the ID of the contact specified when convertLead() was invoked.
LeadId String ID of the converted Lead.
OpportunityId String ID of the new Opportunity, if one was created when convertLead() was invoked.
Success String Indicates whether the convertLead() call succeeded (true) or not (false) for this object.
Errors String If an error occurred during the create() call, an array of one or more Error objects providing the error code and description.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060