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.

The Email-to-Case functionality’s default behavior is to create cases and also associate contact if the sender’s email(From) address matches any of the contact email in the Org. This way, the contact will be automatically associated with the newly created case.

Let’s see an Example:

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

Basically, The Email-to-Case logic will query all contacts in the Org using the “From” address of email, and the system will automatically link the matched contact to the newly created case.

  • 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 “satyamparasa21@gmail.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.
Email-to-case

Points to Remember:

  • 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

Leave a Comment