function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Scott RussoScott Russo 

Reply to a case email using a default template

Good morning,

One of our company requirements is to include automatically enter the case # in the subject line and include our corporate signature in all Support Case email replies.  This requires a few extra clicks for our support agents, and they forget to use the template when they are extremely busy, trying to rush a reply.  We want the ability to click the 'Reply' or 'Reply all' link to reply to the customer, and have a default email template inserted, or have a something similar.

I see the ability to do this within the Support Settings: "Enable Default Email Templates or the Default Handler for Email Action"
But I have not clue what is required with regard to selecting an "Apex Class Name"  We do not have a developer on staff, and I'm puzzled as to why I would need to write code to make this functionality work.
Can someone help fill in the blanks?  Thank you, and have a great day
 
Rajiv Bhatt 16Rajiv Bhatt 16
Looks like this link has the solution for defaulting the templates, have you tried this already? https://developer.salesforce.com/forums/ForumsMain?id=906F00000008kinIAA
Scott RussoScott Russo
I did search before posting, and found that article.  I'm not sure I understand the thread in the link you provided.  If I'm not mistaken, the thread is talking about adding button code. Werewolf's blog link is dead, so I can't find any info there related to my question about creating the Apex Class object, and the code required to make it work.  Thanks
Ido Greenbaum 10Ido Greenbaum 10
Hey Scott, 
I believe the answer would require coding an implementation of the Support.EmailTemplateSelector (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_email_template_selector.htm)interface. 
I was able to implement this succesfully, but just discovered that this only fires once and sets the Template on the initial Case Publisher load. Whenever selecting 'Reply', 'ReplyAll' or simply composing a new email on the existing Tab, the Layout isn't populated again. 

If you need any assistance with implementing the Default Layout setting, please let me know. 
Ido.