Introducing a new way to review your PRs.

Read the announcement

frappe / helpdesk

Modern, Streamlined, Free and Open Source Customer Service Software

View on GitHub

20 documents · Updated Nov 23, 2026

docs / knowledge-base

Knowledge base and article publishing

The knowledge base turns support knowledge into articles that agents can write and customers can read. Agents control article status, visibility, order, and category structure. Customers find allowed published articles by browsing categories or searching before they open a ticket.

Knowledge base model

The knowledge base uses articles as its content unit and categories as its navigation structure. An article also carries the rules that control who can read it, where it appears, and how it enters search.

Articles

An article has a title, rich content, author, category, status, visibility, and reading signals. Its status controls whether the article is part of the customer knowledge base, while visibility limits which readers may open it.

Article stateCustomer effect
DraftHidden from customer reading and search. Agents can continue to edit it.
PublishedAvailable when its visibility allows the reader. It can appear in categories, on the home page, and in search.
ArchivedRemoved from active category placement and customer access. It remains available for agent records.

Published articles need content. Public articles can be read without a customer role. Customer-visible articles can also be limited to signed-in customers. Private articles remain for agent use.

References: helpdesk/…/hd_article.json• L26-136 helpdesk/…/hd_article.py• L21-118 helpdesk/…/hd_article.py• L204-247

Categories

Categories give customers a path from a broad topic to related articles. They form a shallow tree with top-level categories and one level of subcategories. A category is readable only when its branch has an article that the reader can access.

Agents can pin top-level categories for the knowledge base home page. Articles in a category can inherit a stricter visibility rule from that category branch, so moving an article can narrow access but cannot widen it.

General is the protected default category. It cannot be renamed or deleted. Deleting a top-level category promotes its subcategories and moves its articles to General; deleting a subcategory moves its articles to its parent. A category cannot be left without an article or child category during normal article and category changes.

References: helpdesk/…/hd_article_category.json• L23-95 helpdesk/…/hd_article_category.py• L14-152 helpdesk/…/hd_article_category.py• L214-325 helpdesk/…/hd_article_category_tree.js• L1-40

Publishing flow

The publishing flow moves support content from agent work to controlled customer discovery. Creating or changing an article also updates the search data used by customer questions.

This diagram shows how an article moves through authoring, access control, category navigation, and search.

flowchart LR
    A[Agent creates article] --> B[Draft]
    B --> C[Agent adds content and category]
    C --> D{Publish?}
    D -->|No| B
    D -->|Yes| E[Published with visibility]
    E --> F[Category and home page]
    E --> G[Customer search]
    E --> H[Customer article page]
    D -->|Archive| I[Archived for agent records]

Agent authoring

Agents use the desk to create articles, set their category and visibility, publish or archive them, and manage their order. A new category can be created with a starter article so that the category has content from the start. The detailed authoring experience is described in Knowledge base authoring.

The category tree supports top-level categories and subcategories. It keeps the same category rules as other agent actions, including the protected General category and the one-level tree limit.

References: helpdesk/…/hd_article.py• L29-118 helpdesk/…/hd_article_category.py• L14-65 helpdesk/…/hd_article_category.py• L154-175 helpdesk/…/hd_article_category_tree.js• L1-40

Customer discovery

Customers start from the knowledge base home page. They can open a pinned category, browse its article previews, or open a shared article link. The customer view checks both publication status and visibility before it returns content. The detailed customer experience is described in Customer knowledge base access.

Customers can give one helpful or not helpful vote per article. Signed-in users are tied to their account. Anonymous voting is allowed only when enabled and requires a visitor identifier.

References: helpdesk/…/hd_article.py• L156-189 helpdesk/…/hd_article.py• L204-247 helpdesk/…/test_hd_article.py• L10-148 helpdesk/…/hd_article_category.py• L179-211

Search behavior

Article search helps a customer find an answer before creating a ticket. It searches the published article text and headings, then links a result to the matching part of the article when possible. Draft, archived, and unreadable articles do not become customer results.

Search data is refreshed after article changes and after category changes that affect article context. Bulk category operations group these refreshes so that a large move produces one controlled update rather than many separate jobs.

When a customer cannot find an answer, the ticket flow can use the same article search to suggest relevant content before ticket submission.

References: helpdesk/…/hd_article.py• L110-118 helpdesk/…/hd_article_category.py• L96-116 helpdesk/…/hd_article_category.py• L328-389

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep article status and visibility rules aligned across agent access, customer access, category visibility, and search indexing.
  • Keep category moves and deletes aligned with article visibility narrowing and the rule that active categories retain content.
  • Keep category tree actions aligned with the one-level structure and the protected General category.
  • Keep article and category changes aligned with batched search refreshes so customer search matches the current content and category context.
  • Keep the five-article pinned home-page limit aligned between article validation and the customer home-page behavior.

Important failure modes

TriggerConsequenceGuard
An agent publishes an article without contentThe article cannot enter the published state.Publication validation requires article content.
A customer requests a draft, archived, or unreadable articleThe customer does not receive private article content.Article access filters require published status and allowed visibility.
A category change would leave its branch without contentCustomer navigation can lose a category with no usable answer.Category and article validation require another article or child category.
An agent tries to create or rename a category as GeneralThe protected default category rule is broken.Category validation reserves the name and protects the existing category.
A subcategory is nested below another subcategoryThe category tree becomes deeper than the supported model.Parent validation permits only one child level.
An anonymous visitor votes without a visitor identifier or settingFeedback cannot be tied to one reader or may bypass the account rule.Voting checks the setting and requires a visitor identifier for guests.
Search refresh is delayed after content or category changesCustomers may see stale or missing results.Article index updates are queued after commit and grouped for bulk changes.

Key files

FileWhy to read it
helpdesk/…/hd_article.pyDefines article status, visibility, publication, pinning, feedback, and search refresh rules.
helpdesk/…/hd_article.jsonDefines the article fields and the states that agents manage.
helpdesk/…/hd_article_category.pyDefines category hierarchy, visibility narrowing, protected defaults, and content-preserving moves.
helpdesk/…/hd_article_category_tree.jsShows how agents create and browse the category tree.
helpdesk/…/hd_article_category.jsonDefines the category tree and customer read permissions.
helpdesk/…/test_hd_article.pyShows the guarantees for publication safeguards, access feedback, and category content retention.
helpdesk/…/test_hd_article_category.pyShows the guarantees for category names, hierarchy, pinning, tree repair, and starter articles.