There are several possibilities, sorted from most common to least common:
- If there are multiple matches (duplicates) on the email address within the same object (Contact, Lead, User), a random record will be selected, based on whichever record Salesforce provides as the first result. There is no consistent rule for which record you can expect to get back.
- The From Address on the Inbound Email Message record (accessed from Salesforce) matches an existing User. For customers using the Auto-Add New Contacts feature, a Contact will not be automatically created for an email address that matches to an existing user in your Org.
- There is no match on the email address, perhaps because you are in a Developer or Configuration Only sandbox that doesn't contain your data. Search all objects for the email address in question and see what is returned.
- The From Address on the Inbound Email Message record (accessed from within Salesforce) does not show the address of the original sender. (Eg. The From Address shows as "firstname.lastname@example.org" instead of "email@example.com"). This may be caused by improperly configured mail forwarding rules. Please see the following knowledge article for best practices for users of MS Exchange / Office 365:
- There is a lookup filter on the Case Contact or Case Lead field preventing selection a the record.
- You are using a private sharing model for Contacts and Leads and the Context User doesn't have read access. Ensure that your Context User has at least read access to all Contacts and Leads that might be involved with a Case.
- If Users are not selected in Case Teams as expected and you are in a Sandbox, it is likely because Salesforce alters the email addresses on Users to prevent unintended emails.
- If Contacts are not selected as expected and you are in Sandbox, you may have custom code that alters the emails address on Contacts to prevent unintended emails.
- If you do not have the "Search Custom Email fields" setting enabled, Email to Case Premium only searches standard Email fields and won't find matches in custom fields.
If you are still having an issue with Contact, Lead or User matching after investigating these possible explanations, please contact firstname.lastname@example.org for assistance.