+ Start a Discussion
sf11sf11 

How to suppress email thread Id for outbound email based on a condition

We have enabled email thread Id generation for outbound emails from case. Is there a way to suppress the email thread Id based on a criteria ?

 

My Use case is - . if case type = 'XYZ'  don't embed thread Id in the email ELSE generate the thread Id and embed into email 

 

Here is what we tried but didn't work...

 

We wrote a trigger on Email object to replace the thread Id with NULL (search and replace) in the body of the email, if case type != XYZ.  This does replace the thread Id with null string in the body text  , but the recipient still see thread Id in the email.  If we look at the email record in SFDC, we don’t see thread Id in body it seems like trigger does the job but SFDC inserts thread Id at some later stage just before sending the email .

 

Any thoughts on how to suppress the thread Id based on case condition (e.g. if case type = 'XYZ'  don't embed thread Id in the email)?

 

Regards,