Hello,
I have an org that uses email-to-case and we run into the issue where customers will search their email for their last communication with us and reply to it rather than sending a new email. This creates the problem of reopening a very old case but also associates the incoming email to an old case for a different support issue.
It seems like you cannot edit the ParentId of an EmailMessage record to associate the new email to a different case. Ideally, when someone replies to an old case, I'd like to be able to create a new case and relate the new email to that case rather than it being related to an old case and issue.
Does anyone know of a solution to be able to associate emails with a different case?
Thanks,
Tyler
good question, and it depends on which threading mode your org uses. Cloning the EmailMessage onto the new case does NOT change the thread token/headers already sitting in the customer's inbox, so under the old Ref ID (ref:_...:ref) threading their next reply still carries the old case's token and lands back on the original case - the clone alone won't re-route it. Header-based / Lightning threading behaves differently: Email-to-Case matches an inbound reply on the Message-ID in the In-Reply-To/References headers and attaches it to the MOST RECENTLY CREATED EmailMessage whose Message-ID matches, so if your cloned EmailMessage preserves the original Message-ID, that clone becomes the newest match and future replies thread onto the NEW case instead of the old one. So Michael's flow works, but only when (a) you're on header-based/Lightning threading and (b) the clone keeps the original Message-ID/headers - on Ref ID threading it won't move the conversation. For the root 'replies reopening closed cases' issue, the cleaner lever is switching to header-based/Lightning threading and using the Email-to-Case reopen settings so a reply to a closed case spins up a new case rather than reopening the old one. If this helps, please mark it as the Best Answer so it helps the next person - thanks!