• Scott Fenech 7
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
With the new update of email-to-case threading behavior, Thread-Id field is being deprecated: https://releasenotes.docs.salesforce.com/en-us/winter21/release-notes/rn_email_to_case.htm 

I have an apex class that sends out an auto-response to contacts in a case based on a integration to a customer portal.

I added the thread-id before from the case before but now when this doesn't work I need to set header info so when a contact responds to the auto-response the response is added to the case, and doesn't create a new case according to this new email-to-case behavior.

I have tried using the setReferences() on Messaging.SingleEmailMessage to set a reference to the case, but I can't find proper documentation of how to set the reference, I just need a reference to the case so the response gets inserted correctly.