Source: https://www.vtfriday.com/2026/12/salesforce-knowledge-articles-data.html
When support agents type the same troubleshooting steps into individual Case Comments all week, that work vanishes into closed tickets. New hires cannot search for it, customers cannot fix the issue themselves, and managers have no easy way to verify whether agents are still sending accurate steps.
Salesforce Knowledge (specifically Lightning Knowledge) turns those repeated replies into versioned, searchable records. By combining article Record Types, Data Categories, and channel checkboxes, one knowledge base can show internal runbooks to agents in the Service Console while exposing approved guides to customers on an Experience Cloud site.
Networking / Routers. When the next router ticket arrives, the Lightning Knowledge component suggests that exact article on the Case page, and the agent attaches and emails it in two clicks. Putting the same article on your customer portal lets visitors find the reset steps while typing their question, stopping dozens of tickets before they ever hit a queue.
🔑 Key points
- Lightning Knowledge stores all articles on one standard object (
Knowledge__kav) and separates FAQs, Troubleshooting Guides, and Internal SOPs with standard Record Types and Page Layouts. Legacy Classic Knowledge used a separate object per article type. - Every article follows a versioned
PublishStatuslifecycle: Draft, Published (Onlinein SOQL), and Archived. Authors can edit a new draft version while the older published version stays live. - Data Category Groups organize articles into hierarchical trees (such as
ProductsorRegions) and control record-level visibility via Roles, Profiles, or Permission Sets. - Showing an article to a customer or partner takes two green lights: the article must be enabled for their Channel (like
Visible to CustomerorVisible in Public Knowledge Base), and the user must have visibility into the article's assigned Data Categories (unless your org uses Standard Salesforce Sharing for Knowledge). - Attaching articles to Cases creates
CaseArticlejunction records for reporting, while placing the Case Deflection component next to a portal support form surfaces matching articles before the customer clicks Submit.
🎬 Example scenario: the "invisible articles" portal launch
The symptom: An admin turns on Lightning Knowledge, publishes 50 customer-facing FAQ articles, and checks Visible to Customer and Visible in Public Knowledge Base on every record. When customers log into the Experience Cloud portal, search returns zero results. Even Tier-1 agents in the Service Console see nothing.
The cause: During authoring, the team tagged every article under a new Product_Lines Data Category Group. In Setup under Default Data Category Visibility, the admin set that group's default to None to stay cautious, planning to open access later via Permission Sets. They forgot to configure Data Category Visibility on the Tier-1 Agent and Customer Portal Permission Sets. Once an article carries a Data Category, any user with None visibility for that category cannot see the article, no matter which Channel boxes are checked.
The fix: The admin opens the Tier-1 Agent Permission Set and sets Product_Lines to All Categories. Then they open the Customer Portal Profile or Permission Set and set Custom visibility covering only the public consumer product categories, leaving Internal_Hardware_Tools out.
Verification: Logging in as a Tier-1 agent brings all 50 articles plus internal runbooks into the Case Knowledge widget. Logging into the Experience Cloud site as a customer shows only the public consumer FAQs.
⚙️ How Lightning Knowledge and Data Categories work
Building a knowledge base that scales without leaking internal procedures comes down to three parts: how the underlying objects store versions, how the publish cycle works, and how Channels interact with Data Categories.
1. The Lightning Knowledge data model (Knowledge__ka vs. Knowledge__kav)
Behind the scenes, Lightning Knowledge splits every article across a small family of objects:
Knowledge__ka(Knowledge Article) is the parent record that represents the article across its full history. It holds the permanentArticleNumberand tracks aggregate view and attachment stats.Knowledge__kav(Knowledge Article Version) is the specific version record whereTitle,UrlName,PublishStatus,VersionNumber, and your custom fields (such asSummary,Procedure_Steps__c, orInternal_Notes__c) live. In SOQL, Flows, and LWC, you almost always work withKnowledge__kav.Knowledge__DataCategorySelectionlinks a specific article version to a Data Category inside a Data Category Group.CaseArticleis the junction record created whenever an agent attaches a Knowledge article to a Case.
2. Record Types and the publish lifecycle
Not every article needs the same layout. A quick customer FAQ might only need a Question and an Answer rich-text field, while an engineering troubleshooting guide needs Symptoms, Root Cause, Resolution Steps, and Internal Escalation Notes. Lightning Knowledge handles this with standard Record Types and Page Layouts on the Knowledge object.
Every article version moves through three PublishStatus states:
- Draft: The article is being written or reviewed. Only users with draft-viewing permissions can see it. You can attach a standard Approval Process so drafts require technical or editorial sign-off before going live.
- Published (
Onlinein SOQL): The article is approved and searchable across its enabled channels. - Archived: The article drops out of active search results (either manually or on a scheduled expiration date), while historical links on older closed Cases stay intact for reporting.
When a product changes, an author clicks Edit as Draft on a published article. Salesforce spins up a new Knowledge__kav record with PublishStatus = 'Draft' while keeping the current published version live until the new draft is published.
3. Data Categories and the two layers of visibility
Data Categories group articles into logical hierarchies, such as a Products group containing Hardware / Routers and Software / Cloud_VPN. Unless your org turns on Standard Salesforce Sharing for Lightning Knowledge, Data Categories also act as the record-level security gate.
When deciding whether a user can see a published article, Salesforce checks two controls together:
- Layer 1 (Channel checkboxes): Four boolean flags on the article decide which audiences are eligible:
IsVisibleInApp(Internal App),IsVisibleInCsp(authenticated Experience Cloud customers),IsVisibleInPrm(Partner Portal), andIsVisibleInPkb(Public Knowledge Base for guest visitors). - Layer 2 (Data Category visibility): Roles, Permission Sets, and Profiles control which branches of each Data Category Group a user can see, using All Categories, None, or Custom.
Three Data Category visibility rules trip up admins regularly. First, if an article has no Data Categories assigned, any user who has access to its published Channel can view it. Second, if an article is tagged across multiple Data Category Groups, the user must have visibility into at least one assigned category in each group. Third, granting access to a category implicitly includes its parent and child categories in that hierarchy, and child roles in the Role Hierarchy cannot see more categories than their parent role.
🛠️ Worked example: setting up internal and portal Knowledge with deflection
Here is a practical setup walkthrough: configuring Lightning Knowledge so support agents see both internal and public networking articles inside the Service Console, while customers on an Experience Cloud site see only public guides that deflect new Cases.
Prerequisites, licenses, and permissions
- Salesforce Knowledge is included with Service Cloud in Performance and Unlimited Editions, and available as an add-on in Enterprise and Professional Editions (plus Developer Edition for testing). Any user who creates, edits, or publishes articles needs the Knowledge User feature license checked on their User record.
- Readers need at least
Readon the Knowledge object. Authors and publishers need app permissions such asManage Salesforce Knowledge,Edit Knowledge,Publish Articles, andView Draft Articles, ideally bundled in a Permission Set. - Enabling Lightning Knowledge in Setup is permanent. Once you flip it on, you cannot turn it back off in that org, so always build and test your Record Types and category tree in a Sandbox first.
Step-by-step declarative setup
- Make sure your admin User record has the Knowledge User checkbox selected. In Setup, open Knowledge Settings, click Edit, check Enable Lightning Knowledge, and save.
- Open Object Manager > Knowledge and add custom Rich Text fields such as
Resolution_Steps__candInternal_Agent_Notes__c. Use Field-Level Security (FLS) to hideInternal_Agent_Notes__cfrom Customer and Guest profiles so internal notes never appear on public articles. CreateFAQandTroubleshooting_GuideRecord Types with matching Page Layouts. - In Setup, open Data Category Setup and create a group named
Support_Topics. UnderAll, addNetworking_PublicandInternal_Runbooks, then activate the group. Under Default Data Category Visibility, setSupport_Topicsto None (or Custom for public only). In your Support Agent Permission Set, grant All Categories visibility onSupport_Topics. In your Customer Portal Profile or Permission Set, grant Custom visibility toNetworking_Publiconly. - Open a Case record, click Edit Page in Lightning App Builder, drag the standard Knowledge component onto the right sidebar, and save. Then go to Knowledge Settings > Suggested Articles and choose the Case fields (like
SubjectandProduct__c) Salesforce should scan when recommending articles. - Open Experience Builder for your support site and go to the Contact Support page. Place both the Contact Support Form and the Case Deflection component on the page so published articles appear as customers type their Subject or Description.
Querying published articles by Data Category in SOQL (illustrative excerpt)
If you build a custom LWC or Apex service to display Knowledge articles, SOQL queries on Knowledge__kav follow a few special rules. You must filter on PublishStatus = 'Online' (and usually Language = 'en_US' or the running user's language), and category filtering uses the WITH DATA CATEGORY clause.
The illustrative Apex excerpt below queries published customer-visible articles in the Networking_Public__c category and all of its subcategories. This is an excerpt only: update the category API names to match your org and test it in a sandbox before deploying.
// Illustrative Apex Excerpt: Querying published Knowledge articles with WITH DATA CATEGORY
// Prerequisites: Lightning Knowledge enabled; Data Category Group 'Support_Topics__c'
// and category 'Networking_Public__c' must exist and be active in the org.
public with sharing class KnowledgeSearchService {
@AuraEnabled(cacheable=true)
public static List<Knowledge__kav> getPublicNetworkingArticles(Integer maxRecords) {
Integer rowLimit = (maxRecords != null && maxRecords > 0 && maxRecords <= 50) ? maxRecords : 10;
// Filter by PublishStatus = 'Online', Language, Channel flag, and Data Category tree.
// Valid selectors: AT, ABOVE, BELOW (includes the category and all subcategories), ABOVE_OR_BELOW.
List<Knowledge__kav> articles = [
SELECT Id, KnowledgeArticleId, Title, Summary, UrlName, ArticleNumber
FROM Knowledge__kav
WHERE PublishStatus = 'Online'
AND Language = 'en_US'
AND IsVisibleInCsp = true
WITH DATA CATEGORY Support_Topics__c BELOW Networking_Public__c
WITH USER_MODE
ORDER BY Title ASC
LIMIT :rowLimit
];
return articles;
}
}
A few syntax rules from the Salesforce Knowledge Developer Guide are easy to miss here. Both the Data Category Group name (Support_Topics__c) and category name (Networking_Public__c) need the __c suffix inside WITH DATA CATEGORY. The only valid selectors are AT, ABOVE, BELOW (which already includes the named category plus all child categories), and ABOVE_OR_BELOW. You can include at most three category conditions joined by AND (never OR), and bind variables are not supported inside WITH DATA CATEGORY. Adding WITH USER_MODE enforces the running user's object and field permissions.
How to verify your setup
- Create and publish two test articles. For Article A (
Router Factory Reset Guide), checkVisible in Internal AppandVisible to Customer, assignNetworking_Public, and publish. For Article B (Tier-3 SSH Root Recovery), check onlyVisible in Internal App, assignInternal_Runbooks, and publish. - Log in as a Support Agent, open a Case with the Subject
Router reset needed, and confirm that both Article A and Article B appear in the Knowledge sidebar. Attach Article A and verify that it shows up in the Case's Articles related list. - Log into your Experience Cloud portal as a test Customer user, open the Contact Support page, and type
Router resetinto the Subject field. Confirm that the Case Deflection widget suggests Article A, while searching forSSH Root Recoveryreturns zero results.
⚠️ Common mistakes and traps
Trap 1: Publishing an internal article with no Data Categories assigned
Under default category-based visibility, an uncategorized article is open to any user who can access its published Channel. If someone accidentally checks Visible to Customer on an internal runbook and skips Data Categories, every portal customer can read it. Require category assignment during review, or switch to Standard Salesforce Sharing if criteria-based sharing rules fit your org better.
Trap 2: Skipping Field-Level Security (FLS) on custom Knowledge fields
Even when a customer has Channel access, Data Category visibility, and Object Read on Knowledge__kav, custom fields like Resolution_Steps__c will show up blank on the portal unless the Customer or Guest User Profile has Read FLS on those fields. The reverse matters just as much: if one article layout holds both public steps and internal notes, lock down FLS on the internal notes field.
Trap 3: Assuming Draft edits go live on their own
Editing a published article creates a new Draft version with an incremented VersionNumber. Agents and customers keep seeing the older published version until someone with Publish Articles clicks Publish on that draft.
Trap 4: Measuring success by total articles written
Pushing agents to write hundreds of unreviewed articles clogs search with duplicates and half-baked notes. Track Case Attachment rate, article helpfulness votes, and Case Deflection counts instead, and archive stale articles on a regular schedule.
🧭 360 Card: Salesforce Knowledge and Data Categories
Rule: Knowledge Articles capture verified, versioned answers once. Data Categories and Channel checkboxes organize those answers and control which audiences can read them.
Benefit: One accurate article can close hundreds of agent-worked Cases in two clicks and deflect self-service portal questions before they become tickets.
Tradeoff: A knowledge base needs ongoing editorial ownership (writing standards, approval checks, category governance, and archival). Left alone, stale articles quickly lose agent and customer trust.
Limits: Orgs allow 3 active Data Category groups by default (up to 6 with a Salesforce Support increase), up to 5 hierarchy levels per group, and 100 categories per group by default (up to 500 with a Support increase). Visibility requires aligning Object permissions, FLS, Channels, and Data Categories.
Alternative (answering in Case Comments or emails): Zero curation overhead for a one-off edge case, but agents cannot reuse the answer later and customers get no self-service deflection.
At scale: Follow the Knowledge-Centered Service (KCS) "Rule of Three": the third time your team writes out the same explanation on a ticket, turn it into a Knowledge article.
❓ Core Q&A and scenario walkthroughs
Internal App vs. Customer) paired with Data Category visibility on Roles or Permission Sets. Place the Knowledge component on the Case page for agents and expose public articles on the Experience Cloud site.
A: Serving both internal agents and external customers from one knowledge base comes down to five steps:
- Enable Lightning Knowledge in Setup, assign the Knowledge User feature license to authors, and create Record Types (such as FAQ and Internal SOP) with tailored Page Layouts and Field-Level Security.
- Create Data Category Groups (such as
ProductsandAudience_Scope) to tag articles by topic and sensitivity. - Give internal agent Roles or Permission Sets All Categories visibility and access to the
Internal Appchannel. Limit Customer and Guest Profiles or Permission Sets to Custom visibility on public categories only, and checkCustomerorPublic Knowledge Baseonly on approved public articles. - Place the standard Knowledge component on the Case Lightning Record Page and configure Suggested Articles in Knowledge Settings so Salesforce matches Case
Subjectand category fields automatically. - Expose Knowledge on your Experience Cloud site, map Topics or Data Categories as needed, and add Article Search and Case Deflection components to your support pages.
A1: Almost every article visibility issue comes down to four checkpoints. Check them in this order:
- Data Category visibility (Role, Permission Set, Profile): Check the user's effective visibility for every active category group tagged on the article. If an agent has None (or a narrow Custom branch) on any assigned group, the article disappears. Conversely, if a Customer or Guest Profile has visibility into an internal category, or if the article has no Data Category assigned at all, external users can see it whenever the channel allows.
- Channel checkboxes on the article: Check
Visible in Internal App,Visible to Customer,Visible to Partner, andVisible in Public Knowledge Base. Internal runbooks should only haveVisible in Internal Appchecked. - Publish status (
Draftvs.Published): Confirm the article is actually Published. Users withoutView Draft Articlescan only see Published versions. - Object permissions, FLS, and sharing model: Confirm the user has
Readon Knowledge andReadFLS on the custom Rich Text fields holding the answer. Also check Knowledge Settings to see if the org enabled Use standard Salesforce sharing (Org-Wide Defaults and Sharing Rules) instead of Data Category visibility.
A2: Knowledge lowers ticket volume through Case Deflection, which puts matching answers in front of customers while they are filling out a support form, before the Case is ever created:
- When a customer opens the Contact Support page on an Experience Cloud site and starts typing a Subject or Description (like
Cannot reset MFA token), the Case Deflection component reads that text in real time and lists matching published articles next to the form. If the customer clicks an article and confirms it solved their problem, they leave without submitting a Case and Salesforce logs a deflection event. - Three setup items make this work: publish clear, customer-facing articles to the Customer or Public Knowledge Base channel with Data Categories the portal user can view; place both the Contact Support Form and the Case Deflection component on the same Experience Builder page; and track Case Deflection and search-gap reports so you can write new articles for searches that return zero results.
- When a new issue does turn into a Case, agents resolve it, flag the gap, and publish a new article so the next customer with that question gets deflected automatically.
A3: Case Comments and one-off emails solve one customer's problem once. The answer stays buried inside a closed Case, gets no review, goes stale quietly when the product changes, and cannot help the next customer on the portal.
Knowledge articles take upfront effort (Record Types, Data Categories, and review approvals), but every published article pays off across the whole support operation. Agents attach verified steps in seconds, new hires learn from them, and Experience Cloud uses them to deflect repetitive tickets around the clock. A simple rule of thumb: use Case Comments for unique, account-specific fixes, and write a Knowledge article the third time your team answers the same question.
✅ Self-check question: An author publishes a Knowledge article titled VPN Error 403 Workaround, checks both Visible in Internal App and Visible to Customer, and assigns it to Enterprise_VPN. A customer logs into the Experience Cloud portal. Their Profile has Read on Knowledge, All Categories visibility, and Customer channel access. When they open the article, they see the Title and Summary, but the entire Workaround Steps section is missing. Why?
Answer: Field-Level Security (FLS) on the custom Workaround_Steps__c field is not granted to the Customer Profile or Permission Set. Channel checkboxes and Data Category visibility control record-level access (which is why standard fields like Title and Summary show up), while Salesforce still enforces standard FLS on every custom field in the layout.
🔗 Next concept follow-up: grounding Agentforce and Einstein with Knowledge
A: Clean Lightning Knowledge articles are the primary grounding source for Salesforce's AI support tools. Standard keyword-based Suggested Articles matches words in the Case Subject, whereas Einstein Article Recommendations looks at historical CaseArticle attachment patterns and natural language across Case fields to rank the articles most likely to close a ticket.
Einstein Knowledge Creation and Agentforce Service Agents go a step further using Retrieval-Augmented Generation (RAG) to draft grounded replies from your published articles. Because those tools respect the running user's Data Category visibility and Field-Level Security, keeping your category tree and FLS tight ensures internal runbooks stay out of customer-facing AI responses.
Comments
Questions, corrections and your own experience are all welcome.
Post a Comment