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-customer-access

Customer knowledge base access

The customer knowledge base gives signed-in portal users a focused way to find published help articles. Users can start with categories, search for an answer, and open an article for reading. For the wider article model and publishing flow, see Knowledge base and article publishing and Knowledge base authoring.

Portal experience

The customer knowledge base runs inside the portal shell and uses a separate route group from the agent knowledge base. The portal keeps the normal customer navigation while the route marks the shared article view as customer-facing. That lets the same view support read-only customer reading and agent editing without mixing the two experiences.

Portal routes

The customer flow has one route for the category landing page, one route for the articles in a category, and one route for an article. Route names carry navigation intent even when users move through links rather than enter a URL directly:

User goalPortal pathRoute role
Open the knowledge base/kb-publicShows search and published categories
Browse a category/kb-public/:categoryIdShows published articles in one category
Read an article/kb-public/articles/:articleIdShows the full published article

Each route requires an authenticated session. The public route flag means the route uses the customer-facing experience. It does not allow an anonymous user to read the portal. An unauthenticated visit goes to login and keeps the requested path for return after sign-in.

References: desk/…/index.ts• L135-195 desk/…/index.ts• L229-255

Portal shell

The portal root chooses the visual shell from the signed-in user rather than from the URL alone. A user with agent access keeps the agent shell on a customer-facing route. A customer uses the customer shell, which then selects desktop or mobile layout from the screen size.

References: desk/…/PortalRoot.vue• L16-25 desk/…/CustomerPortalRoot.vue• L1-27

Content discovery

The landing page combines direct browsing with question-based search. This gives users a clear path when they know the topic and a faster path when they know the problem.

Category browsing

The landing page lists only categories that contain at least one published article. Each category shows its published article count. Selecting a category opens a grid of article cards, while the breadcrumb gives the user a direct path back to the knowledge base landing page.

References: desk/…/KnowledgeBaseCustomer.vue• L9-27 desk/…/CategoryFolderContainer.vue• L1-21 helpdesk/…/knowledge_base.py• L89-102 desk/…/CategoryFolder.vue• L1-23

The category view requests only published articles for its selected category. Each card gives a short text preview plus the author and relative update time. Selecting a card opens the shared public article route.

References: desk/…/Articles.vue• L9-21 desk/…/Articles.vue• L33-57 helpdesk/…/knowledge_base.py• L105-117 desk/…/ArticleCard.vue• L1-34

Article search

The search field accepts a question and opens a result popover after the user enters at least three characters. Search results appear as article sections rather than as a separate search page, so a result can take the user straight to the part of an article that may answer the question.

The search service cleans the query and searches published article text and headings. It first tries the full term set, then uses noun phrases and key nouns as fallback searches. Results are limited to the small set used by the suggestion view.

References: desk/…/SearchPopover.vue• L6-40 desk/…/SearchArticles.vue• L1-73 helpdesk/…/article.py• L71-92 helpdesk/search.py• L214-260 helpdesk/search.py• L306-354

A search result contains an article identifier and an optional heading anchor. The portal opens the article in a new tab and uses the anchor to move the reader to the matching section. If no result matches a query, the search view asks the user to rephrase the question with keywords.

References: desk/…/SearchArticles.vue• L18-45 desk/…/SearchArticles.vue• L49-61 desk/…/Article.vue• L778-792

Article reading

The article view is the final reading surface for customer content. It loads the article by identifier, displays its formatted body with category breadcrumbs, and keeps customer reading separate from agent publishing actions.

Published content

The customer view exposes the article title, body, author, and modification time. The backend permits a non-agent to fetch an article only when its status is Published; a draft or other non-published article is rejected. This rule protects direct links as well as normal category navigation.

The shared article view uses read mode for customer access. Editing, publishing, category changes, and other management actions belong to the agent experience. When an article request fails because the user cannot access it, the portal leaves the reader and returns to the knowledge base experience.

References: helpdesk/…/knowledge_base.py• L10-41 desk/…/Article.vue• L21-35 desk/…/Article.vue• L40-75 desk/…/Article.vue• L465-483

Article usage

The article reader shows basic usage signals with the article, including its view total and feedback totals. These values come from the article statistics service and help readers and agents see whether an article is being used.

References: desk/…/Article.vue• L417-424 desk/…/Article.vue• L485-494 desk/…/Article.vue• L794-801

Access boundaries

Customer access is defined by both portal routing and article state. Routing selects the customer experience for marked public routes, while the backend checks publication and visibility before it returns article content.

The customer-facing category and article lists contain published content only. Categories with no published articles are hidden. Agents can change access for a category or for selected articles, so a publishing change can remove content from customer discovery without changing the article body. Agents use the separate agent routes to create drafts, edit articles, publish them, or change their access. A new article starts outside the customer reading set until an agent publishes it.

References: helpdesk/…/knowledge_base.py• L89-117 desk/…/KnowledgeBaseAgent.vue• L290-367 desk/…/KnowledgeBaseAgent.vue• L377-468 desk/…/NewArticle.vue• L124-145 desk/…/Article.vue• L496-523

Change checklist

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

  • Keep the three customer route names and their link targets aligned. Category cards, breadcrumbs, search results, and article sharing all depend on those route contracts.
  • Keep the portal route flag and the article access check aligned. A route can look customer-facing while a backend change still exposes or hides the wrong article state.
  • Keep search result anchors aligned with the heading IDs created by the article reader. A mismatch turns a valid result into a link to the top of the article.
  • Keep the published filter consistent across category counts, category cards, search indexing, and direct article reads. A draft must not appear in one discovery path only.
  • When category or bulk article access changes, check category visibility, article lists, search results, and direct article reads together.
  • Keep new article creation pointed at the agent article flow. A draft must not become customer-readable before its publish state and visibility are set.

Important failure modes

TriggerConsequenceGuard
A category contains no published articlesThe category is hidden from the landing pageBuild category counts from published articles and remove zero-count categories
An agent changes a category to privateThe category and its articles leave the customer portalApply the category access change to every article and refresh customer discovery data
A customer opens a draft or restricted article linkThe article request is denied and the portal returns to the knowledge base landing pageEnforce the publication and visibility checks in the article endpoint and handle permission errors in the article view
A search query has fewer than three characters in the portalThe search popover does not open or request resultsRequire the minimum query length before loading search results
The search index is missing or staleSearch can return no useful answer even though an article existsRebuild or restore the helpdesk search index before relying on search results
An article heading ID differs from the search result anchorThe reader opens the article but does not jump to the matching sectionGenerate heading IDs and search anchors from the same heading text rule

Key files

FileWhy to read it
desk/…/index.tsDefines the customer knowledge base routes and the login and persona gates around them.
desk/…/PortalRoot.vueShows how the session selects the agent or customer portal shell.
desk/…/CustomerPortalRoot.vueShows the customer shell’s desktop and mobile layout boundary.
desk/…/KnowledgeBaseCustomer.vueDefines the customer landing page with search and category discovery.
desk/…/CategoryFolderContainer.vueConnects the landing page to the list of categories with published content.
desk/…/Articles.vueDefines category article browsing and its breadcrumb path.
desk/…/Article.vueProvides the shared article reading surface and the boundary between reading and agent actions.
desk/…/SearchArticles.vueConnects customer queries to article results and heading links.
helpdesk/…/knowledge_base.pyDefines the publication gate and customer-facing category, article, and view operations.
helpdesk/…/article.pyDefines the customer article search behavior and its fallback query path.
helpdesk/search.pyDescribes the published article data and headings used by the search index.
desk/…/KnowledgeBaseAgent.vueShows how agents change access for categories and selected articles.
desk/…/NewArticle.vueShows that new content enters the agent flow before publication.