Knowledge Base, Help Center & Reports

Publish self-service content as topics → categories → articles, configure the client portal help center record that the published site reads, and run frontline report queries.

Backend modules: backend/plugins/frontline_api/src/modules/{knowledgebase,helpcenter,reports}. Frontend: frontend/plugins/frontline_ui/src/modules/{knowledgebase,helpcenter,report} at /frontline/knowledgebase, /frontline/helpcenter, and /frontline/reports.

Knowledge base

Hierarchy

Content is organized TopicCategoryArticle:

  • A Topic is the top-level grouping published to portals (title, description, brandId, color, icon, languageCode).
  • A Category groups articles inside a topic (title, description, icon, topicIds, parentCategoryId, numArticles).
  • An Article carries title, summary, content, status (draft/publish), isPrivate, reactionChoices/reactionCounts, topicId, categoryId, attachments, image, pdfAttachment, publication fields (createdUser, createdDate, modifiedDate), and form codes that attach a lead form to the article.

Knowledge base queries and mutations

Schema: modules/knowledgebase/graphql/schemas/knowledgeBaseTypeDefs.ts.

OperationKindPurpose
knowledgeBaseTopics / knowledgeBaseTopicDetail / knowledgeBaseTopicsTotalCountqueryTopic reads
knowledgeBaseCategories / knowledgeBaseCategoryDetail / knowledgeBaseCategoriesTotalCount / knowledgeBaseCategoriesGetLastqueryCategory reads
knowledgeBaseArticles / knowledgeBaseArticleDetail / knowledgeBaseArticlesTotalCountqueryArticle reads
knowledgeBaseArticleDetailAndIncViewCount / knowledgeBaseArticlesIncrementViewCountquery/mutationRead while incrementing the article view counter
knowledgeBaseTopicsAdd / …Edit / …RemovemutationTopic management
knowledgeBaseCategoriesAdd / …Edit / …RemovemutationCategory management
knowledgeBaseArticlesAdd / …Edit / …RemovemutationArticle management
cpKnowledgeBaseTopicDetailqueryClient portal read used by the published help center

AI knowledge source

The knowledge base registers an AI knowledge source through meta/automations: ai.knowledgeSources contains { key: 'knowledgebase.article', label: 'Knowledge base articles', moduleName: 'knowledgebase', sourceSelector: 'remote-module', supportsFullScope: true }. Articles index with the category title included (articles are often titled numerically), so agent knowledge lookups match meaningful terms.

Help Center

The config record

HelpCenterConfig is the single record a published help center site reads. helpCenterConfigUpdate(config) upserts it; sections include:

  • General: title, description, url, erxesAppToken, brandId, languageCode, knowledge-base toggle/label/kbTopicId (kbToggle, kbLabel), ticket toggle/label/ticketChannelId/ticketPipelineId/ticketStatusId (ticketToggle, ticketLabel).
  • Appearance: top-level color and backgroundImage, plus a styles object with mainLogo, favicon, bodyColor, headerColor, footerColor, helpCenterColor, backgroundColor, activeTabColor, baseFont/baseColor, headingFont/headingColor, linkColor/linkHoverColor, primaryButtonColor/secondaryButtonColor, dividerColor, and raw headerHtml/footerHtml.
  • Header: wordmark, homeLabel, formsLabel, announcementsLabel, searchPlaceholder.
  • Footer: logo, description, copyright, and columns (heading plus links of label/url).

Domain resolution

helpCenterGetConfigByDomain ignores its argument and reads the config from the request's Origin header. The header is normalized and matched (case-insensitively, prefix + /) against each config's url. Its wrapperConfig.skipPermission: true flag makes it callable without the showHelpCenter permission, which is what the published app calls before any user logs in.

If helpCenterGetConfigByDomain returns nothing, no config's url matches the request's Origin. Create one with helpCenterConfigUpdate.

Help Center queries and mutations

Schema: modules/helpcenter/graphql/schemas/helpCenterConfig.ts.

OperationKindPurpose
helpCenterConfig(_id) / helpCenterConfigs(page, perPage, searchValue, brandId) / helpCenterConfigsTotalCountqueryAdmin reads
helpCenterGetConfigByDomainqueryPublic resolution by request Origin (skipPermission: true)
helpCenterConfigUpdate(config) / helpCenterConfigRemove(_id)mutationUpsert / remove

How the Help Center app uses it

The standalone apps/help-center Next.js app (port 3900, NEXT_PUBLIC_ERXES_API_URL, NEXT_PUBLIC_APP_VERSION) calls helpCenterGetConfigByDomain for configuration, then cpKnowledgeBaseTopicDetail for content, cpForms/cpFormDetail for forms, and cpGetTickets/cpGetTicket/cpTicketGetNotes/cpCreateTicket/cpTicketCreateNote for portal tickets. See Help Center.

Reports

The reports module backs /frontline/reports, /frontline/calls/dashboard, and /frontline/calls/statistics.

AreaQueriesService
InboxreportConversationList, reportConversationOpen/Closed/Resolved, reportConversationTags, reportConversationSources, reportConversationResponses, reportConversationExport, conversationProgressChart and member/source/tag progressreportConversation* resolvers
TicketsreportTicketList, reportTicketSource, reportTicketDate, reportTicketOpen, reportTicketTags, reportTicketCustomProperties, reportTicketStatusSummary, reportTicketPriority, reportTicketExportticket report resolvers
CallscallReportIntegrations, callGetQueueStats, callGetAgentStats, getCallbackStats, callVolumeSeries, callCarrierBreakdown, callHeatmap, callHeatmapDaily, callTopNumbers, callGetOperatorStats, callHistoryListcallReportService.ts, callHistoryService.ts, callStatistics.ts
FacebookreportFacebookPages, reportFacebookActivity, reportFacebookBots, reportFacebookSyncPostStatsfacebookSyncService.ts
Saved chartsreportCharts, reportChartDetail, reportChartAdd, reportChartEdit/Remove (stored in frontline_report_charts)chart resolvers
Was this helpful?