The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Knowledge subscription notifications under Paris

ABouland
Kilo Guru

Under New York and Orlando, the content of subscribable notifications for knowledge articles was tied to a script action: Activity Fanout Manager for KM.  details here: https://community.servicenow.com/community?id=community_question&sys_id=4f054d0ddb2adf000be6a345ca961976

In short, the script action contained many lines of code which created JSON objects that got passed back to the event which then got added to the notification by mail script.

This extensive code is now replaced by a single line in Paris release.

the new Activity Fanout Manager for KM is simply:

new KBFanoutManager().fanout(current);

 

Can anyone explain what/where this KBFanoutManager is?

If my customizations to my notifications need to be scrapped, not the end of the world but was nice having a few extra details that weren't OOB.  I'm having difficulty understanding what is going on with the above and am not finding any references in the documentation or within the system.

 

Thanks,

Andrew

 

3 REPLIES 3

SanjivMeher
Kilo Patron
Kilo Patron

Did you try searching KBFanoutManager in script includes?


Please mark this response as correct or helpful if it assisted you with your question.

ABouland
Kilo Guru

Aha, found it:

find_real_file.png

which I assume then calls another script include: KBFanoutManagerSNC which is read only and according to description should never be changed:

find_real_file.png

 

So, back to the initial issue - are subscription based notifications for Knowledge articles under Paris simply unable to be customized?

Example I had been using:

Notification: KM Subscription: Article revised

content provided by mail script: Notification: Article revised

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {

var obj = new JSON().decode(event.parm2);
var article_link = new KBCommon().getArticleLink(obj.sys_id);
email.setSubject("Reg: Article "+obj.number+" has been revised");
template.print("Hi "+obj.receiver+",<br/>");
template.print("<br/>");
template.print("A new version of ");
template.print("<a href='"+article_link+ "'>"+obj.number+"</a>");
template.print(" has been published on "+obj.updated_on+".<br/>");
//above is OOB - if you want additional detail, add below and then similarly modify

//script action: Activity Fanout Manager for KM to create obj referenced below

//below is customized

//template.print("<b>Originally Published </b>: "+obj.created_on+"<br/>");
template.print("<b>Author</b>: "+obj.author+"<br/>");
template.print("<b>Revised by</b>: "+obj.revised_by+"<br/>");
template.print("<b>Published by</b>: "+obj.sys_updated_by+"<br/>");
template.print("<b>Short Desc.</b>: "+obj.short_description+"<br/>");

 

 

With Paris upgrade, the updated script action no longer provides means to define the custom obj references I've added above or am I missing something with how the two new KBFanoutManager script includes are working? 

 

You can create a custom script action, which should be using the same event used by the OOB script action and add you old code to it.


Please mark this response as correct or helpful if it assisted you with your question.