Index Salesforce Knowledge
Index Salesforce Knowledge
Salesforce Knowledge is a knowledge base where your organization can create and manage articles to help users find answers to common questions. Knowledge articles can include how-to guides, FAQs, troubleshooting steps, and other documentation that’s essential for providing effective customer support.
By indexing Salesforce Knowledge in Coveo, you enable users to search and access these articles directly from Coveo-powered search interfaces, helping them resolve issues faster and provide consistent information. Knowledge articles can be organized by article types (such as How-To, FAQ, or Product Documentation) and can include rich content, attachments, and custom fields.
This article explains how to configure your Salesforce source to index Knowledge articles, including both Classic Knowledge and Lightning Knowledge. You’ll learn which objects and fields to select, how to configure body mappings to display article content in search results, and how to handle special considerations like article translations and data categories.
Index Salesforce Knowledge
-
Add a Salesforce source linked to your Salesforce organization, ensuring all prerequisites are met. Ensure all permissions required to index Knowledge have been set.
NoteThe Knowledge User permission is required to index Classic Knowledge articles only. It doesn’t apply when Lightning Knowledge is enabled.
-
On the source subpage, the Content to index subtab lets you select the objects and fields you want to index. You can use the filter at the top of the list to quickly find the Knowledge objects.
-
To index Classic Knowledge, select the Knowledge Article Types (for example, How-To, FAQ) that you want to index.
Leading practiceThe list of created Article Types is available on the All Article Types page in Salesforce. To access this page, from Setup (Salesforce Classic), enter
Knowledge Article Typesin the Quick Find box, and then select Knowledge Article Types. -
For each object you selected, make sure to select the Salesforce fields and relationships you want to index.
-
Follow the instructions under Add a Salesforce source to finish creating your Salesforce source.
Configure a body mapping
The item body is the search-optimized HTML representation of the actual item content. For standard sources, the document processing manager (DPM) generates a representative body once the item reaches the processing stage of the indexing pipeline. This default body is displayed in the quickview.
Since Knowledge articles don’t have a default body mapping, you must configure the mapping to get relevant search results and to ensure proper functioning of the Quickview component.
See Define a Salesforce object body for instructions on how to configure a body mapping for Salesforce objects.
The body mapping feature supports HTML tags to format the body displayed in the Quickview.
As a result, you can enter content to be treated as HTML, given you enter it inside an <html> element.
For example, if you want a Knowledge object to display the Knowledge article description, question, resolution, and summary, you enter the following mapping rule: <html><body>%[Kav_Descriptionc]<br>%[Kav_Questionc]<br>%[Kav_Resolution__c]<br>%[Kav_Summary]</body></html>`
|
|
Note
The |
The changes will be effective once you’ve saved and rebuilt your source.
Knowledge features
Creation of metadata per category group
Salesforce Knowledge uses data categories to classify articles into logical categories that help users find relevant content more easily. When indexing Knowledge, the following metadata and field mappings are automatically created to represent the data category selection for each article.
| Metadata | Description | Field |
|---|---|---|
|
The article categories for the |
Where:
|
|
The category labels that can be used to find an article when performing a query. The format used is compatible with hierarchical facets. |
Where:
|
Seamless migration from Classic Knowledge to Lightning Knowledge
When migrating from Classic Knowledge to Lightning Knowledge, the UseMigrateToFromArticleIdForPermanentIdGeneration hidden parameter can be used to preserve the permanent IDs of your Classic Knowledge article versions.
Preserving the original permanent IDs is necessary to avoid breaking your existing featured result rules and to avoid losing your Coveo Machine Learning (Coveo ML) Automatic Relevance Tuning (ART) boosted search results that relate to your Knowledge content.
Body mappings
With Lightning Knowledge, it’s now possible to specify a different body layout for each record type (for example, FAQ and Troubleshooting).
To configure a different body for a record type
-
Add an item type that matches the record type.
The format for specifying the Item Type is:
<OBJECT_NAME>:<RECORD_TYPE>Where:
-
<OBJECT_NAME>is the name of the Salesforce Object (for example, Knowledge) -
<RECORD_TYPE>is the type of Salesforce record (for example, FAQ)ExampleKnowledge:FAQ
-
-
Add a mapping rule to your source.
Notes-
When applying the mapping rule, click Specific item types to select the items to which the mapping rule should apply.
-
Enter the mapping rule using the format specified in the Configure a body mapping section above.
-
Multilingual support
When indexing Knowledge, one article version per language is indexed by default. Each article version is also assigned a unique permanent ID during the indexing process.
Known limitations
KB record access based on data categories
In Salesforce, if you rely on data categories to control Classic or Lightning KB record access, beware that these permissions can’t be indexed as this information isn’t available in the Salesforce API. Consequently, in search results, all users can view all KB articles under all data categories. Cases such as this one require custom manipulations to ensure content security.
|
|
Note
When standard Salesforce Sharing for Lightning Knowledge is enabled for Lightning KB record access, all Knowledge permissions are supported, including permissions set on Online, Draft, and Archived articles. |
Refresh limitations
A refresh is successfully triggered only when both the Knowledge Article (__KA) and Knowledge Article Version (__KAV) records are updated.
This means that if only one of these records is updated, the corresponding indexed item won’t be refreshed until the other record is also updated.
When investigating refresh issues, ensure that both records have been updated by checking the SystemModStamp field on both records to confirm they have changed.