When you enable Swantide's Auto Convert Lead to Contacts workflow you will deploy the following Metadata Components
Metadata | Name | What it does |
Apex Class | ConvertLeads | Writes to the Database to convert the Lead to a Contact |
Field (Account) | Domain Name Helper | Used to parse the Account web domain from Website |
Field (Account) | Domain | Used to parse the Account web domain from Website. Used this Field when matching the Lead to Account. |
Field (Lead) | Email Domain | Formula field to parse the Lead's email domain to match the Accounts Web Domain |
Flow | Swantide - Auto Convert Lead if Domain Matches Account
| When triggered, the flow will look for a Matching Account. If a Matching Account was found, then it will look for an existing Contact. If an Existing Contact was found, then it will convert the Lead to the Existing Contact. If an Existing Contact was not found, it will convert the Lead to a New Contact on the found Account. |
Out of the Box the Flow will look like this:
Actions | What it does |
1 | Entry Criteria: When a lead is created or updated, and Email Domain, Email, First and Last Name are not blank, then trigger the flow. |
2 | Get Record: Look for an Account where Lead Email Domain Matches Account Web Domain |
3 | Decision: Was an Account found from Step 2? If Yes, continue to look for Contact. If no, then do nothing. |
4 | Get Record: Look for a Contact where (Account Id = Id from step 2 AND Email) = Lead Record Information OR = Lead Record Information |
5 | Decision: Was a Matching Account Found? Then proceed to 6(a). If not, proceed to step 6(b) |
6(a) | A Contact was Found! Convert the Lead to the Matching Contact. |
6(b) | A Contact was Not Found! Convert the Lead to the Matching Account but created a New Contact. |
Some Possible Updates You Could Make!
Use Case 1: Create an Account if No Matching Account is Found.
If no matching Account was found in Step 2. You can create an Account, and then have that Lead get converted into the newly created account.
To do so click on the open circle - see image below
Click on Create Records
Enter in relevant Record Metadata from the Lead Record onto the Account.
For example for the Account Name, I started typing "record" and then under Global Variables, I search for Company. By doing so, when creating the Account record, the Account Name will inherit the Lead's Company Name (Make sure you're reps are entering this information which you can deploy one of our validation rules to check for this).
After you entered the fields you want for Account Creation, repeat the Above Step but this time select "Action"
Then fill out the relevant information as such. You will use the API Name of the Create Record step that you created above for the Account Id.
Use Case 2: Making the Matching Criteria More Dynamic on the Account Lookup
In the below example, we are extending the matching Criteria to not only see if the Lead Record's Email Domain Matches the Account Domain but we are also checking if:
The Lead's Website equals the Account's Website
The Lead's Company Name Matches the Account Name
Or if the Lead already has an Account Id Lookup populated. To know more about this workflow click here or deploy this workflow directly to use this as a matching criteria for this workflow.
Once deployed as Lead are created, then they Account Lookup thats being populated on the Lead Record can then be used as a matching condition in Step 2.