Loading

On-Demand 'Email-to-Case' logic for thread IDs included in inbound email

Date de publication: Oct 13, 2022
Description
What is the logic used to associate emails with a thread ID (Ref ID) to a Case?
Résolution

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 is 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: ref:_00D30oKPx._50030bwIii:ref

Note: If multiple thread IDs are included in the header or the body of the email sent, the email 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
Numéro d’article de la base de connaissances

000382674

 
Chargement
Salesforce Help | Article