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
Renee ProrokRenee Prorok 

Email2case management between departments

We are trying to bring up another department to use case management, and they already have their own email address.  We are finding that since this department already communicates with the other department already on Salesforce using cases (Member Services), new cases are not being created.  Instead, the emails to this new department are getting linked up to the existing case already created by Member Services, since they started the case in Salesforce (establishing the thread/ref #), and the other department was added later.  The case thread ID (ex: [ ref:00DdeHLa.500dIPVHW:ref ]) was already established, so even though a new email2case address was added, it is linking up with the existing case, instead of creating a new one.
 
I read that you can turn the case thread/ref# off, but this change can’t be made by record type, so it wouldn’t work for us.  

Can anyone recommend a solution (prefer flow over apex trigger, but if apex is unavoidable, that's fine)

Thank You!
SonamSonam (Salesforce Developers) 
Hoping I've understood the issue correctly - Thread ID is unique for each case created in an ORG as its a combination of the case ID and ORG ID so not sure why your emails to/from new cases are being attached to the existing cases - Am I missing something? 

Is it that the replies being sent have the thread ID in the body?

What you can do is - remove the thread ID from the Body through the available setting under Email to Case and only keep it in the subject.

With the thread ID only available on the subject, your users can remove(manually or use a template without thread ID to forward the email) when they are forwarding the email to the other department and when they respond - it will create another case...
Renee ProrokRenee Prorok
Hi Sonam-
Correct, thread ID is unique for every case, however, once a case is created, if another email2case address is added to the email, it does not create a new case since all emails for the already existing case are automatically routed back to the orginal case (since that is the only thread ID ever established). After the first thread ID is established, we could add 50 different email2case addresses to the email, and no other cases would be created - that email would just tie back to the original case.  Does that make sense?

The thread ID in the subject looks very messy, but I understand it might be another option.  However, isn't the ID added AFTER the user clicks "Send"?  that's how it works when the thread ID is in the body of the email.  Does it work the same way when it is in the subject?  If so, there is no way for the user to completely remove the thread ID since it is added after the user sends the email.

I was hoping there might be some sort of code we can write to have all cases sent to xyz address automatically create a new case, or something like that.
SonamSonam (Salesforce Developers) 
Renee - this makes perfect sense - you are correct  that a case incoming with the thread ID will attach to the existing case and not create a new case.

Yes, thread ID gets auto added once the mail is sent from the Salesforce system and works the same way as it does when present in the body.

What we can try is - create a email service(which can be the new address where users send email) such that it can create a new case of the incoming email :
https://developer.salesforce.com/page/Force.com_Email_Services