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.
- Create a new Salesforce case by sending an email to flutterant15@gmail.com.
- As can be seen below, a new email was created, and accounts and contacts were also liked automatically.
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.
- Try sending an email now from that address to check if the accounts and contacts are linked.
- 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.
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