Additional Email Fields on Leads and Contacts
helpH2
Upon initial installation, Match My Email will use the value in the Lead or Contact standard email field to match an email. Many companies and organizations may have created their own custom email fields on these objects in order to save secondary email addresses used by outside contacts for communication. Match My Email only knows to look for the standard email field as that is consistent across all organizations. A custom rule is needed in package configuration to direct the app to custom email fields using the API field names.
It is important to note that a text field containing multiple email addresses separated by commas will not work. Each secondary email address must be in its own custom field and that field needs to be of data type Email. The field can be called whatever makes sense for your organization – so it could be as direct as Email 2 or it could be more descriptive such as Alternate Work Email.
As an example, let’s say we have a Contact that on any given day uses one of two (2) email addresses to communicate with your company. One of these addresses is already stored in the standard email field. When Match My Email analyzes an email to or from that individual where the 2nd email address is used, our system would not “see” the custom email fields and therefore not match the message. A custom rule will allow our system to take these additional fields into consideration.
First, you need to find the API name for this custom email field. To do so:
- Navigate to Salesforce Setup > Object Manager
- Click on the Object label, in this example it would be Contact
- Click on Fields and Relationship and find the field in the list.
- The API name is in the Field Name column. Custom fields will end with __c, which is 2 underscores and a lower case c.
Once you know the API Field Name, navigate to Salesforce Setup > Installed Packages > Match My Email Configure > Customize > Secondary Emails
- Copy the below code from the opening { to closing }
{
“Contact”: {
“Email2__c”: “Email”
}
}
- Paste the code into the box you see.
- Update the field name between the quotes to be your API Field Name. So instead of Email2__c, replace this with yours such as Other_Email__c. It would then look like the following:
{
“Contact”: {
“Other_Email__c”: “Email”
}
}
Notes on the Code
- There should not be any spaces between the double quote and what is inside the double quote. Sometimes when you paste a field name, your computer may add a space. You do not want it to look like ” Email_2__c “. Remove any extra spaces so the field name is squeezed tightly between the quotation marks.
- No matter what your field name is, custom fields will always end with 2 underscores and a c. So be sure you have 2 underscores, not just one.
- If your custom field is on a WhatID object, such as an Account, Person Account, Opportunity or Custom Object, please contact our support team. That rule code is structured differently and deployed in a different location in package configuration.
- If your custom email field is on the Lead instead, the code would look like the following:
{
“Lead”: {
“Other_Email__c”: “Email”
}
}
Two (or more) custom email fields on one or more objects
If you have more than just one custom email field on the same object, the rules are slightly modified. As in the below set, you can see the line of code containing fields beyond the first one begins with a comma and space before the double quote.
{
“Contact”: {
“Secondary_Email__c”: “Email”
, “Tertiary_Email__c”: “Email”
}
}
If you have more than one email field on both the Lead and Contact object, the code would look as follows. Note that for the second section of code for the Contact, there is a comma and space that starts that line.
{
“Lead”: {
“Email2__c”: “Email”
, “Email3__c”: “Email”
}
, “Contact”: {
“Email2__c”: “Email”
, “Email3__c”: “Email”
}
Contact our support team for questions or assistance.