Customize Knowledge Subscription Emails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2018 05:37 AM
Hello,
I have a requirement to update (customize) the Subscription emails that come out of the box for Knowledge Subscriptions (there are 5 total).
I am having a hard time understanding the logic the current emails are built on. It currently uses a Notification Mail script to pull in information, which I've pasted the name & code from that script.
I want to make this into a table format (to be consistent w/ the rest of our organization's emails)... is it possible to add HTML to this code here in to add a table? I have tried w/ no success. Also, I am looking to pull in the article Short Description and Author of the article.
Can anyone help with this? like I said I am not even sure where this is pulling from.
Thanks
Notification: Article commented
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
var obj = new JSON().decode(event.parm2);
email.setSubject("Reg: Article "+obj.article_number+ " has been commented on "+obj.commented_on);
template.print("Hi "+obj.receiver+",<br/>");
template.print("<br/>");
template.print("An article that you have created/updated has received a new comment.<br/>");
template.print("<br/>");
template.print("<b>Article Number</b>: <a href='https://"+gs.getProperty('instance_name')+".service-now.com/kb_view.do?sys_kb_id="+obj.article_id + "'>"+obj.article_number+"</a><br/>");
template.print("<b>Commented By</b>: "+obj.commented_by+"<br/>");
template.print("<b>Received On</b>: "+obj.commented_on+"<br/>");
template.print("<b>Comment</b>: "+obj.comment+"<br/>");
template.print("<br/>");
template.print("If this comment requires you to update the article, you may do so from ");
template.print("<a href='https://"+gs.getProperty('instance_name')+".service-now.com/kb_knowledge.do?sys_id="+ obj.latest_version_id + "'>here.</a><br/>");
})(current, template, email, email_action, event);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2018 05:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2020 01:31 PM
So, as warned, updating the Script Action: Activity Fanout Manager for KM from OOB may lead to some issues with future updates. In this example, in Paris release, this script action replaces the entire code as seen above with this line:
new KBFanoutManager().fanout(current);
I am unable to locate KBFanoutManager or what it is anywhere. While I've not made extensive changes to the original code, had added a few lines similar to those above to include a few more details in the subscribable notifications related to knowledge. Am not understanding how the above works though.
Anyone?