You are currently viewing How To Manage Content On Community Sites Using Salesforce Knowledge Articles?

How To Manage Content On Community Sites Using Salesforce Knowledge Articles?

Sharing is caring!

The Salesforce Knowledge base is built out of knowledge articles and is a document of information. The Salesforce Knowledge articles contain process information related to the site or information in the form of FAQs or any other information that is helpful for the users and needs to be displayed, such as resetting your products to its default. A Salesforce knowledge article is an approach for adding content (including any form of media, i.e., text, video, hyperlinks) to the sites. The content added to the site is controlled dynamically from the knowledge object.

There are many steps taken to use the knowledge articles. Let us explore these steps. We enable Salesforce Knowledge to quickly get articles to your customers and agents in a Community Cloud site. Let us first find out how to allow Salesforce to Knowledge. 

Enable Salesforce Knowledge

STEP 1: Move to the users in the org using the following path-: Setup->Users.

STEP 2: Click on the Edit button and Enable the ‘Knowledge User’ by checking the Knowledge User checkbox. And save the changes.

STEP 3: Move to the Knowledge Setting section by following the path: SETUP>Feature Settings>Service>Knowledge>Knowledge Setting.

STEP 4: Enable salesforce knowledge by checking the ‘Yes, I understand the impact of enabling Salesforce Knowledge’ and then click on the ‘Enable Salesforce Knowledge’ button.

STEP 5: For making the salesforce knowledge available in the Lightning experience, click the edit button and check the ‘Enable Lightning Knowledge’ checkbox.

After completing all the above steps, the knowledge object will be visible in the object manager, and also, Salesforce knowledge will be available in the app launcher.

Next, we create a knowledge article. 

Creating A Knowledge Article

STEP 1: In the app launcher, search for ‘Knowledge’ and click on it.

STEP 2: Click on the New button present on the top right.

STEP 3: Enter the Title and other required information in the corresponding input boxes present on the pop-up window displayed after clicking the New button.

STEP 4: After entering the values in the fields and content in the rich text editor section, click on the Save button.

STEP 5: Click on the Publish button to publish the article.

NOTE: To control the article’s visibility, open Knowledge Admin by clicking the knowledge Admin button on the top right, checking the relevant check boxes for the fields, and clicking the save button. Finally, after making all the changes, publish the article.

Next, we connect knowledge articles to data categories. 

Connecting Knowledge Article With The Data Category

Knowledge articles can be connected to the data categories that are present in the data category setup. For adding/attaching knowledge articles with any Data Category, the data category must be added into the Data Category Setup.

Add the article to any category with the following steps:

STEP 1: Click on the down arrow button present on the right side of the categories section.

STEP 2: From the pop-up window, select the category to which the article is attached and click the save button.

Fetch The Knowledge Articles Using Apex

For fetching the articles in the Apex, the query needs to be done on the Knowledge__kav object and fetch the fields accordingly, including Summary, Article, UrlName, and other fields as per the requirement.

Here is a code snippet to fetch the article in the Apex:

Now comes the turn for using the content in the Lightning component. 

Use The Content Of The Article In The Lightning Component

The article’s content that is fetched in the Apex can now be passed into the Lightning component by using the class in the controller of the Lightning component(for Aura component) or by using the wire method of the Lightning component( for Lightning Web Component).

After the article’s content has been received into the component, the same content needs to be displayed on the UI of the component, with all the formatting being the same as was set in the rich text editor while editing the knowledge article. 

The next step is to display the content on the experience site. 

Display The Content Of The Article On The Experience Site By Using The Component

For adding the component having the content of Knowledge Article displayed on its UI, just make the component available on the experience sites. To make the component available for the experience site and the component visible in the builder, add the interface using the below code snippet. 

After implementing this interface, the component will be visible in the Community Site Builder. The component can be dragged and dropped at the required position on any page present in the Builder.


Create and manage a knowledge base based on your company information, and securely share it whenever and wherever needed. The Salesforce Knowledge enables you to quickly get articles to your customers and agents in a Community Cloud site. It comprises knowledge articles, which are documents of information and contain process information, say information about the site or FAQs, helpful for the users and needs to be displayed. A Salesforce knowledge article adds content to the sites, controlled dynamically from the knowledge object. The articles are written by experienced service agents and internal writers and published on various channels.

Want to boost and enhance the productivity of your business? Connect with the team of Salesforce experts at Cloud Analogy who will provide you extensive assistance in regards to Salesforce integration and implementation. 


Ajay Dubedi

CEO | Founder
Ajay Dubedi, the founder and CEO of Cloud Analogy, is a prominent Salesforce Sales, Service, and Marketing cloud Consultant with a rich expertise in handling challenging business models. Ajay has assisted and implemented solutions in industries comprising Banking, Health Care, Networking, Education, Telecommunication and Manufacturing. Ajay is globally acclaimed for his extensive experience in APEX Programming, VisualForce pages, Triggers, Workflows, Page Layouts, Roles, Profiles, Reports & Dashboards.

Hire the best Salesforce Implementation Partner. Choose Cloud Analogy, the world's most preferred Salesforce Implementation Company that provides custom CRM Implementation services.

Leave a Reply

× How can I help you?