View Matching Accounts and Existing Contacts for Lead Conversion with Flow

left(
IF(OR(BEGINS(Website, "http://www"),BEGINS(Website, "https://www"), BEGINS(Website, "www.")),
SUBSTITUTE(Website, LEFT(Website, FIND(".", Website)), NULL),
IF(BEGINS(Website, "http://"),
MID(Website, FIND('http://', Website, 1)+7, (LEN(Website) - FIND('http://', Website, 1)+7)),
IF(BEGINS(Website, "https://"),
MID(Website, FIND('https://', Website, 1)+8, (LEN(Website) - FIND('https://', Website, 1)+8)),Website))),FIND('.',
IF(OR(BEGINS(Website, "http://www"),BEGINS(Website, "https://www"), BEGINS(Website, "www.")),
SUBSTITUTE(Website, LEFT(Website, FIND(".", Website)), NULL),
IF(BEGINS(Website, "http://"),
MID(Website, FIND('http://', Website, 1)+7, (LEN(Website) - FIND('http://', Website, 1)+7)),
IF(BEGINS(Website, "https://"),MID(Website, FIND('https://', Website, 1)+8, (LEN(Website) - FIND('https://', Website, 1)+8)),Website
))))-1)

Here’s an example of what the formula does, in the Domain column:


HYPERLINK("/" & Id, Name, '_self')
HYPERLINK("/" & Id,   Full_Name__c , '_self')

Create 1 lead record variable named recordId and 1 flow formula resource named leadDomain. For the leadDomain formula:

MID( {!recordId.Email}, FIND("@", {!recordId.Email})+1 ,  FIND(".", {!recordId.Email}, FIND("@", {!recordId.Email})) - FIND("@", {!recordId.Email})-1 )

The leadDomain formula grabs just the domain from the email address on the lead to compare it later with the account’s Domain formula field we created earlier.



That’s it! throw that baby on the lead’s page layout and voila!


Leave a comment