Skip to main content
Version: Latest
Technical ManualLooking for step-by-step instructions? In the User Manual: Knowledge Base Feedback

Knowledge Base Feedback

Each answer to Was this helpful? is kept as a dated record, and the article's counters still sort the help center.

Data model​

KnowledgeArticleFeedback documents live in the Knowledge Base's own YesSql collection, KnowledgeBase (KnowledgeBaseConstants.CollectionName, registered through StoreCollectionOptions).

PropertyHolds
ItemIdThe answer's id
ContentItemId, ContentItemVersionIdThe article and the version the reader read
Title, CategoryIdThe article's title and category term when the reader answered
HelpfulWhether it helped
CommentWhat was missing, after a No (at most 1,000 characters)
CreatedUtcWhen the reader answered
UserId, UserNameThe signed-in reader, empty for a visitor

KnowledgeArticleFeedbackIndex (in the same collection, migration step 6 to 7) holds ItemId, ContentItemId, CategoryId, Helpful, HasComment, CreatedUtc and UserId, with indexes on the date, the article and date, the id and the reader. It declares ExclusiveToDocumentType() and SingleRecordPerDocument().

Answering​

HelpCenterController.Feedback (POST help/articles/{id}/feedback) checks the reader may view the published article, then, under a distributed lock on the article, KnowledgeArticleFeedbackService.RecordAsync saves the record and adds one to HelpfulCount or NotHelpfulCount. A cookie per article keeps the answer's id, so a browser answers once. After a No, the page asks what was missing; POST help/articles/{id}/feedback/comment (AddCommentAsync) keeps the comment only on that browser's own No, only once. Both posts share the knowledge-base-feedback rate-limit group: 20 answers in 10 minutes per visitor address when Orchard Core's Rate Limits feature is on.

Report​

With the Reports feature on, KnowledgeBaseFeedbackReport (knowledge-base-feedback, Knowledge Base Feedback, under General) reads the answers of the period, the last 30 days by default:

SectionHolds
SummaryAnswers, helpful, not helpful, the helpful rate and comments
By articleHelpful, not helpful, rate and comments per article, the least helpful first
By categoryThe same per category, by the category's name with those above it
What was missingThe newest 200 comments, with the time in the reader's time zone (ILocalClock), the article and the reader

It needs View knowledge base feedback, is listed under Reports with the other reports, and exports through the Reports framework (CSV, Excel and PDF when those features are on).

Data set​

With Data Pipelines on, the Knowledge Base data source (KnowledgeBase) has the Knowledge article feedback data set (KnowledgeArticleFeedback): one row per answer, with the answer id, the article id (referencing the Knowledge Article content item), title, category id, helpful, what was missing, when, and the reader (referencing the user). Its date is CreatedUtc, and the id, article, category and reader are key columns of the index. It needs View knowledge base feedback.

Permission​

PermissionAllowsDefault roles
ViewKnowledgeBaseFeedback (View knowledge base feedback)The feedback report and data setAdministrator, Editor

Personal data​

KnowledgeArticleFeedbackPersonalDataContributor takes part in personal data requests for a signed-in reader. An export lists each answer (KnowledgeArticleFeedback) with the article, whether it helped and the comment. An erasure clears UserId and UserName and scrubs the person's details from the comment; the answers stay, so the article's counts don't change.