Adding KB Article link to the notification of the request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 04:06 PM
Hello!!!
I want to add the related KB Article links to the notification of the raised request that being sent, by assigning related KB Articles to corresponding with catalog items.
For example: If someone wants to reset a password and they raised a request to reset a password, we have to provide them the related link of the KB Article in the notification they receive once they submit the request ,so that the person can try it and reset the password within time and by relating it with article by not waiting till the ticket is resolved.
So, how to add the KB Article link in the notification the client receives??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 07:57 PM
Try with mail script shared by @Sainath N, share the details on catalog item & KB mapping.
Either you have one KB per catalog item or multiple KBs are mapped with only one catalog item with option selection based on required work.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 07:49 PM
Hello Sainath and Ashish!!
So sorry for the late reply , I have being finding a way to map the articles to catalog items.
I have 80 catalog items and many KB articles , so how do I map them ?
Thank you so much for the code Sainath, but I have to use it and try after I map the articles and I didn't know how to do that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 08:27 PM
You can create a script include for kb and catalog item mapping as constant if you don't want to make any change at KB or Catalog Item level.
Use the same type json given by @Sainath N and add more kb mapping.
var KBArticleMapping = {
'passwordreset': 'KB123456',
'outlookissue': 'KB456789'
};
write a method in the same script include, pass the catalog item name and return the KB number.
getKBOfCatalog(catalogName){
return KBArticleMapping[catalogName];
}
and update the email notification shared by @Sainath N
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// if email notification running on RITM then current.cat_item.getDisplayValue() will given the catalog item name
var catalogName = current.cat_item.getDisplayValue();
var revelantArticle = new ScriptIncludeName().getKBOfCatalog(catalogName); // replace the script include name
var hlink = '/kb_view.do?sysparm_article=' + revelantArticle;
var link = '<a href=' + hlink + '>' + revelantArticle + '</a>';
template.print(link);
})(current, template, email, email_action, event);
-Thanks
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 08:32 PM
Thank you so much , I will be trying this.