Change the Email Client Template used from reply button in activity log

Community Alums
Not applicable

We have enabled glide.ui16.emailStreamResponseActions to display the email reply buttons in the activity log.

ShawnMc_0-1721659703165.png

These buttons appear to use the Email Client Templates for the Email table.  Here I have modified the "reply-received" template to show that it is being used, and I am also displaying the value for "target_table".

ShawnMc_1-1721659831953.png

This update appears when the reply button is clicked.

ShawnMc_2-1721660058375.png

What I would like to do is create a new Email Client Template to be used when the target table is 'ticket'.  However if I create a new template and in the condition add where Target table is 'ticket' this template is still not used (even with a lower execution order). In fact, if I disable the OOB template, my new template still isn't used.

ShawnMc_3-1721660206884.png

Has anyone created a new Email Client Template ticket for a particular target table and gotten it to work?

 

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

ServiceNow CS7517881 investigation found that in order for Email Client Templates to work with the activity log email buttons, the name of the Email Client Template must not change.  All Email Client Templates that need to work with the "reply" activity log button must be named "reply-received".

 

So in my use case, I created another Email Client Template, named it "reply-received", but added a condition where Target table is ticket, and set the Execution Order lower than the OOB Email Client Template with the same name.

View solution in original post

2 REPLIES 2

Community Alums
Not applicable

ServiceNow CS7517881 investigation found that in order for Email Client Templates to work with the activity log email buttons, the name of the Email Client Template must not change.  All Email Client Templates that need to work with the "reply" activity log button must be named "reply-received".

 

So in my use case, I created another Email Client Template, named it "reply-received", but added a condition where Target table is ticket, and set the Execution Order lower than the OOB Email Client Template with the same name.

Michael Ramos
Tera Contributor

Was looking for this answer to and this was pretty helpful.

 

But wanted to post in case it wasn't immediately obvious.

 

When you go to Email Client > Email Client Templates in the navigator, the module loads the Email Client Templates table with a filter that is excluding the templates targeted on the Email table.

 

Which as mentioned above, is the table the Email client is launching against when clicking the Reply, Reply all, and Forward buttons in the activity log.

 

If you just clear the filter you can see them. Then you can filter to just the templates on the sys_email table.

You can also use the modules under Response Templates - Received and Response Templates - Sent

MichaelRamos_0-1739913679828.png

 

 

You could add new templates with conditions that use an earlier execution order than the OOB ones and leave the OOB ones as a fallback if needed, but this will be based on your requirements. 

 

MichaelRamos_0-1739896968638.png

MichaelRamos_1-1739897245738.png

 

 

Each template is named for a button / (mailbox/email type). So you can control the templates used for each button and email type combo.

 

*Note that I don't know if it is the sys_email type of the mailbox value that is used to determine the template used but the type and mailbox are one to one essentially for the emails that show in the Activity log.

 

TemplateButtonsys_email type value/Mailbox
reply-receivedReplyreceived / Received
replyall-receivedReply Allreceived / Received
forward-receivedForwardreceived / Received
reply-sentReplysent / Sent
replyall-sentReply Allsent / Sent
forward-sentForwardsent / Sent

 

Here is an example of a template on the Email table with a condition of Target Table = incident and the name is replyall-received.

There is no customer replyall-sent template.

 

MichaelRamos_2-1739898923007.png

 

MichaelRamos_3-1739899012128.png

 

 

If you want to mimic the OOB templates and include the original email info, make sure to include the mailscript shown in the OOB templates at the bottom of you custom template's body.