Knowledge Feedback task created with message 'was rated low' even though user said it was "useful"

qster
Kilo Guru

Scenario:

  • User marked the KB article as “Useful” (current.useful == "yes")
  • No comments were provided (!current.comments)
  • No other rating-related inputs were given (e.g., maybe no flagged, or numerical rating fields)

The Code Logic:

var feedback_obj = {};feedback_obj.feedback = current.sys_id;if(current.comments)    feedback_obj.description = current.comments;else if(current.useful == "no")    feedback_obj.description = gs.getMessage("{0} was marked as not helpful", current.article.getDisplayValue());else    feedback_obj.description = gs.getMessage("{0} was rated low", current.article.getDisplayValue());new KBFeedbackTask().createFeedbackTask(feedback_obj, current.flagged);

Behavior in this Case:

  • current.comments → false → skips 1st condition
  • current.useful == "no" → false → skips 2nd condition
  • Lands in the else clause → Uses generic "rated low" message

Result:

feedback_obj.description = gs.getMessage("{0} was rated low", current.article.getDisplayValue());

Then it creates the feedback task regardless.


Is this Expected Behavior?

Not really — at least not logically. The intent of a feedback task is generally to capture negative or constructive feedback that may require follow-up or investigation. If someone marks an article as “Useful” and leaves no comments, creating a task that says it was rated low is:

  • Misleading (they literally said it was useful)
  • Likely unintended (based on standard UX expectations)
  • Possibly not what the vendor intended (unless there's a specific reason to treat lack of detail as suspect, which is not typical)

Potential Fix/Improvement:

Modify the logic to only create a task when there's a clear indicator of dissatisfaction:

var feedback_obj = {};if (current.comments) {    feedback_obj.feedback = current.sys_id;    feedback_obj.description = current.comments;    new KBFeedbackTask().createFeedbackTask(feedback_obj, current.flagged);} else if (current.useful == "no") {    feedback_obj.feedback = current.sys_id;    feedback_obj.description = gs.getMessage("{0} was marked as not helpful", current.article.getDisplayValue());    new KBFeedbackTask().createFeedbackTask(feedback_obj, current.flagged);}

This way:

  • If no comments and it's marked useful, no task is created.
  • If marked not useful or has comments, a task is created.

Let me know if I'm mistaken in this thought process and why ServiceNow hasn't fix this yet or if there is an underlying reason I'm missing.

1 REPLY 1

Robert H
Mega Sage

Hello @qster ,

 

I assume you are referring to the Business Rule "Knowledge Feedback Task Creation" on [kb_task_feedback].

 

Please note that in an OOTB instance this BR only triggers when a "Reason" was provided:

RobertH_0-1745435755978.png

 

When a KB Article is flagged as "Helpful" in the Knowledge Portal or Service Portal the user is not asked to provide a reason, so that field is empty on the Knowledge Feedback record, and the above BR does not trigger. So the issue you describe would not occur.

 

Have you made any changes to this Business Rule, or to any logic or widgets that are involved with processing the "Useful" / "Not useful" feedback?

In which UI or portal is that feedback given?

 

Regards,

Robert