Domain Formula

To route inbound Leads, some customers prefer to use the email domain name rather than a free form company field.

Company name including domain extension

The following formula will extract the company domain name from the email field. e.g. [email protected] will resolve to mycompany.com. It will also ignore the following domains - yahoo.com, gmail.com, hotmail.com, aol.com and outlook.com

CASE( SUBSTITUTE(Email, LEFT(Email, FIND("@", Email)), NULL), 
'yahoo.com', NULL, 'gmail.com', NULL, 'hotmail.com', NULL, 'aol.com', NULL, 'outlook.com', NULL, 

SUBSTITUTE(Email, LEFT(Email, FIND("@", Email)), NULL) )
 

 

Company name without domain extension

The following formula will extract the company name from the email field without the domain extension. e.g. [email protected] will resolve to mycompany, [email protected] will also resolve to mycompany. This can be useful when a single company is using multiple domain extensions. It will also ignore the following domains - yahoo.com, gmail.com, hotmail.com, aol.com, and outlook.com.

SUBSTITUTE(CASE( SUBSTITUTE(Email, LEFT(Email, FIND("@", Email)), NULL), 'yahoo.com', NULL, 'gmail.com', NULL, 'hotmail.com', NULL, 'aol.com', NULL, 'outlook.com', NULL, SUBSTITUTE(Email, LEFT(Email, FIND("@", Email)), NULL)) , RIGHT(Email, LEN( SUBSTITUTE(Email, LEFT(Email, FIND("@", Email)), NULL)) - FIND(".",  SUBSTITUTE(Email, LEFT(Email, FIND("@", Email)), NULL)) + 1), NULL)

Domain formula for Account record to match the Lead domain field

The following formula will extract the company domain from the website field without the domain extension. e.g. www.mycompany.com will resolve to mycompany.com, http://www.mycompany.com will also resolve to mycompany.com. 

If(BEGINS(Website, "www."), MID(Website, FIND('www.', Website, 1)+4, (LEN(Website) - FIND('www.', Website, 1)+4)),If(BEGINS(Website, "http://www."), MID(Website, FIND('http://www.', Website, 1)+11, (LEN(Website) - FIND('http://www.', Website, 1)+11)),If(BEGINS(Website, "https://www."), MID(Website, FIND('https://www.', Website, 1)+12, (LEN(Website) - FIND('https://www.', Website, 1)+12)),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 )))))

How did we do?

Timezone Bucket Formula

Contact