• JonnoG
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

The requirement is

 

  1. Send notification emails to a particular email address whenever there is an email activity in a case. The notification should contain the email body.
  2. The notification emails should contain the attachments that were part of the email that triggered the notification.
  3. The notification emails of case should form a conversation thread in gmail (the specified email address is gmail)

 

I am able to complete the first 2 requirements, but the 3rd one is causing troubles. It works partially though. With all that I have heard Gmail uses the Subject line to group emails into a conversation thread. I have a constant Subject but still the notification emails create new conversation threads for each new day.

 

Example

Day 1 – there are 8 email activities in the case 1 and there are 2 email activities in case 2. The apex code sends 8 notifications related to case 1 that form a conversation thread and 2 notifications for case 2 that form another conversation thread. (this is correct)

Day 2 – there are 3 email activities in case 1 and there are 4 email activities in case 2. The apex code sends 3 notifications related to case 1 but this forms a new conversation thread and is not part of the same conversation thread created on day 1.

 

How can I form a single thread for each case instead of single thread of each case on each day?

 

I tried using the setInReplyTo and setReferences but got errors and the notification was not sent. Will this help in the threading problem, what are the other options?

 

Thanks

KD