How does Email to Case parse the Thread ID in incoming emails via Email to Case OnDemand?
|Knowledge Article Number||000171301|
|Description||What is the logic used to associate emails with a thread ID ( Ref id) to a case.|
|Resolution||When an email enters our incoming MTA's, the Email Services code checks the mail for an existing Thread ID to associate the email to an existing case. The check for the Thread ID contained in an email follows this sequence:
1. The Subject is checked for the Thread ID.
2. If the ID is not found in Subject, the Text Body of the email is parsed for the Thread ID.
3. If the ID in not found in Text Body, the Html Body of the email after calling a utility method to convert the html to text is checked for the Thread ID.
The actual extraction of the Thread ID is looking for anything in between "ref:" and ":ref"
Example of a thread id:
Note: if multiple thread ids are included in the header or the body of the email sent the case will attach to the case that is represented by the first thread id in the string:
Example [ ref:_00D30oKPx._50030bwIii:ref ] [ ref:_00D30oKPx._50030bMuaN:ref ] the email will attach to the case represented by ref:_00D30oKPx._50030bwIii:ref