How Email-to-case associates the Contact to Case

We saw how to set up an Email-to-Case in the previous article. Now we will learn how the system links a newly created case to a Contact.

Salesforce’s Email-to-Case is a powerful feature that streamlines your customer service operations by automatically converting incoming emails into support cases. One of its most valuable aspects is its ability to intelligently associate the correct Contact (and often, their related Account) with the newly created Case. But how exactly does Salesforce achieve this? Let’s dive into the logic!

Let’s see an Example:

  • I’m going to create a new contact in my development Org with the email sa***********@***il.com.
Email-to-case
  • Create a new Salesforce case by sending an email to fl**********@***il.com.
Email-to-case
  • As can be seen below, a new email was created, and accounts and contacts were also liked automatically.
New case

When an email arrives at your designated Email-to-Case address, Salesforce initiates a specific lookup process to identify the sender. The primary mechanism for populating the Contact field on the Case record is by matching the “From” email address of the incoming email.

  • Now, create a new case where the “From” address does not match any contact. Let me try to query all the contacts with the email “sa************@***il.com”. As per the below screenshot, I didn’t find any contact associated with that email.
No contacts
  • Try sending an email now from that address to check if the accounts and contacts are linked.
Email-to-case
  • I can see the newly created case if I go to the recently created cases, but the account and contact are not linked to it. Because that email is not associated with any contacts. However, Salesforce will populate the Web Email (Supplied Email) and Web Name (Supplied Name) fields on the Case with the sender’s email address and name from the incoming email. This provides a reference point for your agents.
Email-to-case

Multiple Matches Found:

This is a crucial scenario to be aware of! If Salesforce finds two or more Contact records with the exact same email address that matches the “From” email address:

  • The Contact field on the new Case record will be left blank.
  • The Account field on the new Case record will also be left blank.
  • Similar to the “No Match Found” scenario, the Web Email and Web Name fields will still be populated.

Why Multiple Matches Lead to a Blank Contact 🤔

Salesforce leaves the Contact field blank when multiple matches are found to prevent ambiguity and ensure data integrity. If it were to arbitrarily pick one, it could lead to incorrect case assignments and misattributed customer interactions. This forces an agent to manually review the case and select the correct contact, ensuring accuracy.

Points to Remember In Email-to-Case:

  • The Email-to-Case logic queries all the Email fields on the Contact object, including Standard and Custom Email fields.
  • Email-to-Case leaves the ‘Contact’ and ‘Account’ fields empty if two or more Contacts have the same email address.
  • If no matching Contacts are found, Email-to-Case leaves the ‘Contact’ and ‘Account’ fields blank, but populate the fields ‘Web Email’ and ‘Web Name.’
  • Web Email (SuppliedEmail) field is a standard field on the Case object. The email address that was entered when the case was created.
  • Web Name(SuppliedName) is the email name that was entered when the case was created

Conclusion

Salesforce Email-to-Case is an indispensable tool for customer service, and its ability to automatically populate the Contact field is a key enabler. By understanding the underlying logic and implementing best practices like data deduplication and thoughtful automation, you can significantly improve the efficiency and accuracy of your case management process. This ensures your support agents always have the right customer context at their fingertips!

Author

  • Satyam parasa

    Satyam Parasa is a Salesforce and Mobile application developer. Passionate about learning new technologies, he is the founder of Flutterant.com, where he shares his knowledge and insights.

    View all posts

Leave a Comment