Using Flow to Convert Leads in Salesforce

Using Flow to Convert Leads in Salesforce

In Salesforce, leads represent potential customers, whether individuals or organizational representatives expressing interest in your product or service. The lead conversion process within Salesforce transforms these leads into accounts, contacts, and opportunities. Users can convert leads in Salesforce by changing their status to a converted status or clicking the out of the box Convert button. However, in some situations, you may want to automate the process and convert leads automatically. Although there is no standard action to convert leads, you can use custom apex actions.

In this post, you can find an invocable action that you can use to convert leads in flow.

How to Use the Component

1- Install the action using the installation links below.

2- Add a new action to your flow and search for "Convert Lead". This is the name of the action that you installed.

Convert Lead Action

3- This action has multiple input variables.

  • Converted Status: Converted Lead Status picklist value.
  • Lead ID: ID of the Lead that you want to convert.
  • Account ID: ID of the Account to convert Lead into. Leave it blank to create a new Account.
  • Contact ID: ID of the Contact to convert Lead into. Leave it blank to create a new Contact.
  • Create Opportunity: Default value is true. Set it as false if you don't want to create an Opportunity.
  • Opportunity Name: If you want to create an Opportunity, then this will be its name. If you leave it blank, then it defaults to Company field from the Lead.
  • Overwrite Lead Source: Overwrite the LeadSource field on the target Contact with the LeadSource field from the Lead. Default is false. If you set it as true, then you must also specify Contact ID.
  • Owner ID: ID of the user to own the new Account, Contact, and Opportunity records. Default is the Lead owner.
  • Send Email to Owner: Send an email to owner specified in Owner ID. Default is false.
Input Values of the Action

4- This action stores the Account ID, Contact ID, Lead ID, and Opportunity ID as the output. So that you can use them in the next elements of your flow.

Output Values of the Action
Using Flow to Convert Leads

Installation Links

Use this link to install in production or developer edition environments.

Use this link to install in sandbox environments.

Be the first to comment

Leave a Reply

Your email address will not be published.