function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ferdy Reyes 3Ferdy Reyes 3 

In Email-To-Case, which is created first, the Case record or the EmailMessage record?

I am wondering which is created first,. In current project I am supporting, the is a Process Builder which is ran when EmailMessage record is either created or updated. This PB then updates the Case record related to the  triggering EmailMessage record. Does this mean the Case record is already created before the EmailMessage record is created?
PriyaPriya (Salesforce Developers) 

Hi Ferdy,

First we setup the Email-to-case functionality and then the case records get created.

For more information, refer this link :- 
https://help.salesforce.com/s/articleView?id=sf.customizesupport_enabling_email_to_case.htm&type=5

If you find the above information helpful, please mark it as best answer.

Regards,

Priya Ranjan