Today we utilize the RefId in the subject line of emails to route emails composed externally (in Outlook manually or via automations) where we want the email to be attached to an existing Case in our Salesforce instance. We compose the email, put the RefId on the Subject, and CC our email-to-Case email address.
Is there going to be any way of replicating this once we activate Lighting Email Threading? Can we generate a token to put into the subject (or body) that will route to the Case, even if no prior outbound email exists on that Case currently in our Salesforce instance?
Real-world example of why we do this: Customer submits a Case asking for a system usage report. We create that report and email it using our external system, but we want the report to be attached to the Case in Salesforce where the customer has made the request. This provides us the ability to track that the report was sent to the customer and the Case can be closed. If there is follow-up on the Case later, or the customer responds to the report email, the agent that owns the Case is notified.
Not having this ability would be a major issue for us and the main reason we have not adopted Threading or message header Ids yet.
@Paul Narsavage I think you should be able to replicate the existing functionality with the new Lightning threading tokens. This Apex method will generate a token for a case: https://developer.salesforce.com/docs/atlas.en-us.248.0.apexref.meta/apexref/apex_System_EmailMessages_getFormattedThreadingToken.htm
If you want a simple way to view the token for a case, then you can give this custom component I built a while back a try: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5a000001XzZn