0

We recently switched to salesforce service cloud, and have some trouble getting all of our customer service emails routed/threaded correctly.

In particular is an email thats sent from our codebase (rails) to a customer and at least one other contact, we cc ourselves so saleforce can be involved in the communication, but this does't thread correctly.

Essentially I need a case/thread_id before I send this email, or I need to send this email from saleforce itself so starts out with a thread_id (ref:) in the subject/email. Id rather the former (create case/get ref thread id programmatically) because there could be 1 or many cc's involved in this email and that sounds increasingly more difficult.

Im trying to read the very verbose docs around the case API's and it feels super fragmented trying to understand if either of those use cases are possible, any pointers to resources, soap or restful wold be super helpful!

  • see https://salesforce.stackexchange.com/questions/237194/create-case-thread-id-using-apex-soql-limit-proof – cropredy Aug 13 '20 at 23:16

1 Answers1

0

Welcome!

We took reference from this post - http://theblogreaders.com/generating-salesforce-case-thread-id-using-apex-class/ - for a similar use case where we wanted to generate thread id to be able to send emails from outside of salesforce.

Hope this helps or at least gives you the right direction.

Best, Vishal

Vishal
  • 325
  • 4
  • 10
  • Im really surprised there's no api to retrieve this. So I guess the only thing left is figuring out how to use the API to create a case and have it return the Case_ID! – Richard O'Reilly Aug 13 '20 at 23:07
  • this link references a solution that is brittle; see https://salesforce.stackexchange.com/questions/237194/create-case-thread-id-using-apex-soql-limit-proof – cropredy Aug 13 '20 at 23:16