Create a flow to handle this automatically.
The below instructions will fit the needs of common Salesforce orgs, you may need to add some case statuses or deviate from the exact instructions to accommodate your organization’s needs. Additional case status updates can be made and additional case status decision outcomes can be added to fit your needs. Remember to always build and test in a sandbox before moving the flow into a production org.
Create a record-triggered flow on the EmailMessage object.
Condition Logic
Note : For outgoing emails, the entry condition "Status = 3" may not work as expected. The flow does not trigger automatically for outgoing EmailMessage records that meet this condition. However, when the same record is debugged manually, the flow executes correctly.
(1 AND 4) OR (2 AND 3 AND 4)
Create a decision element named Email Direction
Note : (Please ensure that the "Incoming" label used in the Email Direction decision element is correctly referencing the EmailMessage (record that triggered the flow) instead of the Email_Direction resource. Using Email_Direction.Incoming may cause the flow to behave incorrectly, as it should be referencing EmailMessage.Incoming for accurate evaluation.)
Incoming
Create a decision element on the Incoming side called Current Case Status
Case is New
Case is Closed
Update closed cases to reopened
Update cases with other statuses to Email Reply Received
Create a decision element on the outgoing side called is the Case Closed or New?
Update cases that are not Closed or New to Pending Customer Reply
Note: As with flow, there are many correct ways to accomplish things that all get to the same outcome. This was written following best practices using the functionality available in flow at the time of writing, as more features come out in flow there may be UI changes causing the images to not match exactly.
Note: At the time of writing, debugging the flow for email messages does not work. More info is available here.
See also :
Build a Flow
Add and Edit Elements in Auto-Layout
_____________________________________
Written By: Andrew Russo | Salesforce Answers Leader
Andrew Russo is an Archa-Admin-Eloper-Analyst at BACA Systems. He has been in the Salesforce ecosystem since 2017 and has immense platform knowledge. He empowers Trailblazers to become more proficient in their use of Salesforce.
Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials). Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality, usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a “best” answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.
If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed
000393845

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.