Knowledge Feedback - Answering Comments

JimCheffer
Kilo Expert

We have Knowledge Base installed for News Topics and feedback turned on. Would like the ability to respond to comments that have been posted. Is this possible? Ideally as the Admin, would like a function to comment on the comment and have the system send a notification to user. Has anyone developed a process or is it available and I have not found it. Thanks.

1 ACCEPTED SOLUTION

Slava Savitsky
Giga Sage

In knowledge feedbacks, there is a field called "Article" that contains a reference to the KB article to which the feedback belongs. So you need to use dot-walking and add Article.Author to the list of recipients of your notification.


View solution in original post

6 REPLIES 6

michael_baker
Tera Guru

Jim,

The comments are stored in the Knowledge Feedback (kb_feedback) table. To accomplish what you need you would need to do the following:

1. Create an event to use when a comment is created
Event name: kb_feedback.inserted
Table: Knowledge Feedback [kb_feedback]

2. Create a "kb_feedback events" after business rule to fire the event
Name: kb_feedback events
Table: Knowledge Feedback [kb_feedback]
When: after
Insert: true
Update: true
Script:


if (current.operation() == 'insert') {
// Retrieve all previously users who have commented on the knowledge article
var commenters = [];
var grFeedback = new GlideRecord ('kb_feedback');
grFeedback.addQuery('article', current.article);
grFeedback.query();
while (grFeedback.next()) {
commenters.push(grFeedback.user.sys_id);
}

gs.eventQueue("kb_feedback.inserted", current, gs.getUserID(), commenters.join(','));
}

3. Create a notification to send when the event fires
Name: Knowledge Feedback - Inserted
Event name: kb_feedback.inserted
Table: Knowledge Feedback [kb_feedback]
User/Group: this can be set to the people who will be responsible for responding to knowledge feedback
User field: event.parm2
Send to event creator: false (this will make the system NOT send a notification to the user that commented on the knowledge article)
Subject: as needed
Message: as needed


Hope this helps!


Eluther
Kilo Explorer

Hey Mike,

I tried the steps you mentioned above but the event isn't firing off. If I modify the script to the following should this still work?

if (current.operation() == 'insert') {
gs.eventQueue("kb_feedback.inserted", current, gs.getUserID(), gs.getUserName());
}

Thanks!


Slava Savitsky
Giga Sage

Setting up an email notifications is indeed the simplest option if you are not going to track all subsequent communication in your Service-Now instance. However, if your knowledge base is fairly big and your IT department structure complex, you might want to treat knowledge feebacks as tasks.

For example, you could create custom fields for assignment group, assignee, and status (e.g. New, Being Reviewed, Closed). Initial dispatching could then be automated by assigning new feedbacks to the authors of respective articles. The only problem with this approach is that you will not be able to see knowledge feedbacks in lists of your groups' tasks because Knowledge Feedback [kb_feedback] table does not extend Task [task] table.

If you are not afraid of customizing UI pages and macros, you could even go further and add a social element to your knowledge base by enabling users to post comments to feedbacks and "like" the helpful ones.


wfrancis
Kilo Contributor

Hey guys,

I'm trying to configure the email notification to be sent to the author of the article. Don't seem to be able to do this probably since the Author field exists on the knowledge table and not knowledge_feedback?