I have a question involving the Case feed email publisher.

For a customer I am currently implementing their Service Cloud. The customer is used to do alot of communication over email and in addition to this they have a lot of email templates they use for communication.

Most part of their customers also have their own ticketing systems so they have an external ticket reference as well. So it's crucial that they maintain the subject of an email if they do a reply.

What happens now and here lies my problem:

  • They make a reply to an email.
  • The subject and previous mail content are filled in in the email publisher.
  • Now the engineer selects a template he wants to use
  • Content of the template is added to the publisher

Now the problem I'm facing is that it also replaces the subject with the one in the template. And this is the behaviour I would like to avoid because when replying on an email with a template my customer wants to keep the original subject of the mail he is replying to.

What I already explored:

I already tried to change the subject in trigger on EmailMessage to replace the subject with the subject of the InReplyTo email. This worked but it only changed the data in Salesforce, the actual mail sent still had the templates subject.

Any idea on the subject is much appreciated as I don't see a real solution to this except to copy the subject before selecting a template, yet that's really the last option :).

  • Try editing your email template and putting {!EmailMessage.Subject} as the subject. I believe this should take the original email's subject (first one in the email chain). Commented May 18, 2015 at 12:20

1 Answer 1


I have tried adding {!EmailMessage.Subject} in the subject line of the reply template which I am specifically using to reply to the existing emails from Salesforce. This helps me to retain the subject without it being overwritten by the template selection. The only drawback here is that it would retain the original subject line and not the lates subject line, but I can live with it as of now. SOMETHING IS BETTER THAN NOTHING I guess...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .