Gradient Works Docs
ProductDynamic BooksPricingRequest Demo
  • Welcome
  • ACCOUNT RESEARCH
    • Overview
      • Features
    • Market Map
      • Account Import
        • Salesforce
        • HubSpot
      • Salesforce Integration
        • How to Install Similar Accounts Component
      • CRM Export
        • Salesforce
        • HubSpot
      • FAQs
        • Attributes in Market Map
    • AI Researcher
      • How to create & configure an AI Researcher
      • Writing effective prompts
      • Prompt examples
      • Managed AI Researcher
    • Lookalikes
    • Credits
  • Bookbuilder
    • Overview
    • Enroll Accounts
    • Target Books
      • Target Book Report
      • Edit Reps
    • Account Coverage
      • Market Coverage
      • Rep Coverage
      • Working Activities
    • Transfer Accounts
      • Concepts
      • Account Pool
      • Distributions
      • Retrievals
      • Returns
      • Templates
      • Scheduling
      • Troubleshooting
    • How-to Guides
      • How to Rank Accounts for Distributions and Retrievals
      • How to Use the "Is In" Operator
  • Routing
    • Overview
    • Dashboard
    • Round Robin Queues
      • Create Queues
      • User Availability Status
      • User Working Hours
    • Users
    • Capacity Meters
    • Lead and Account Matching
    • Automation
      • Automation Executions
      • Log Entries
  • Automation Builder Kit (ABK)
    • Getting Started
    • Actions
      • Assignment
        • Directly Assign Items
        • Round Robin Assign Single Item
        • Round Robin Assign Multiple Items
        • Schedule and Assign Single Item
      • Dynamic Books
        • Retrieval
      • Flow Lifecycle
        • Execute Subflow
        • Failed
        • Finish
        • Resume
        • Start
      • Leads
        • Convert Lead
        • Convert Multiple Leads
      • Logs
        • Log Message
      • Matching
        • Match Account to Account
        • Match Lead to Account
        • Match Lead to Contact
        • Match Lead to Lead
      • Next Steps
        • Add Person to Campaign
        • Add Person to Sales Engagement Cadence
        • Check Person Enrollment in Cadence
        • Create Task
        • Send Single Assignment Email
        • Send Slack Message
      • Users
        • Get Used Capacity
        • Update Capacity
        • Update Weight
      • Utils
        • Evaluate Domain against Denylist
      • Advanced
        • Build Record Map from Lookup
        • Build Record Map from Field
        • Build Text Collection from Field
        • Convert ItemAssigned to Assignment
        • Execute SOQL
        • Get Record from Record Map
        • Assign Pending Items for Multiple Queues
        • Assign Pending Items for Single Queue
        • Enqueue Multiple Items
        • Enqueue Single Item
    • Models
      • AccountMatchResult
      • AccountToAccountMatch
      • Assignment
      • ConvertLeadRequest
      • ConvertLeadResult
      • DomainEvaluationResult
      • GenericSObject
      • LeadToAccountMatch
      • LeadToContactMatch
      • LeadToLeadMatch
      • QueueUserWeight
      • RecordMap
  • Integrations
    • Getting Started
    • Slack
    • Google Workspace
    • Microsoft 365
    • Salesloft
    • Outreach
  • Advanced
    • Salesforce Permissions
  • Miscellaneous
    • Changelog
Powered by GitBook
On this page
  • Inputs
  • Outputs
  1. Automation Builder Kit (ABK)
  2. Actions
  3. Leads

Convert Lead

Converts a Lead with the same logic used in the Salesforce UI

Converts a Lead using functionality similar to that provided by the Convert Lead action in the UI and the Apex function Database.convertLead. Users may optionally supply an account, contact and opportunity to merge the converted lead into. If any of those are not specified they will be created.

Inputs

Name
Required
Type
Description

convertedStatus

Yes

String

The name of a lead status that represents a converted lead (i.e. where IsConverted=true)

lead

Yes

Lead

The Lead to be converted

account

No

Account

If specified, associate the converted lead with this Account

contact

No

Contact

If specified, merge the Lead into this Contact

convertImmediately

No

Boolean

Set to false to prepare the lead for conversion but not actually perform it immediately. Defaults to true.

createOpportunity

No

Boolean

Whether or not to create an opportunity on conversion. Defaults to false. If opportunity is specified, this is ignored.

opportunity

No

Opportunity

If specified, the Opportunity to associate with the converted Lead

opportunityName

No

String

If creating an opportunity, the name of the opportunity to create. If opportunity is specified, this is ignored.

owner

No

User

The user that should own any newly created Account, Contact or Opportunity after conversion.

Outputs

The result of converting the Lead. If conversion was successful, contains references to the Account, Contact and Opportunity the Lead was converted into.

Name
Type
Description

account

Account

The Account into which the converted Lead was merged. If an Account was specified in the request, this will be the same Account instance. If no account was specified, this will contain an Account object with the Id, Name and OwnerId fields. If conversion failed this will be null.

contact

Contact

The Contact into which the converted Lead was merged. If a Contact was specified in the request, this will be the same Contact instance. If no account was specified, this will contain a minimal Contact object with Id, FirstName, LastName and OwnerId. If conversion failed this will be null.

convertRequest

If convertImmediately is false, the prepared conversion is returned.

errorMessage

String

A message describing any error during conversion.

lead

Lead

The lead that was included in the corresponding request. This lead will not be updated to reflect the conversion state. It will not contain IsConverted=true or any of the relevant Converted* fields. Minimal versions of the converted objects for Account, Contact and Opportunity are included in this result.

opportunity

Opportunity

The Opportunity into which the converted Lead was merged. If an Opportunity was specified in the request, this will be the same Opportunity instance. If no opportunity was specified, this will contain a minimal Opportunity object with Id, Name and OwnerId. If conversion failed, this will be null.

success

Boolean

True if the conversion succeeded; false if it failed. If this is false the errorMessage will be populated.

PreviousLeadsNextConvert Multiple Leads

Last updated 2 years ago

ConvertLeadRequest