Index Salesforce Knowledge

This article describes how to index Salesforce Knowledge, which is available in both Salesforce Classic and Lightning Experience. Indexing Knowledge lets your agents access relevant help content such as Knowledge Base (KB) articles and FAQs from your Salesforce Knowledge base.


For information on how to index Salesforce Knowledge article attachments, see Index related files.



  1. On the Sources (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console, click Add source.

  2. Add a Salesforce source linked to your Salesforce organization and select the Knowledge checkbox to index all Knowledge objects.


    To index Classic Knowledge, you will also need to click Select Specific Objects Manually to select the Knowledge Article Types (for example, How-To’s, FAQs) that you want to index.

    Leading practice

    The list of Article Types that have been created is available on the All Article Types page in Salesforce. To access this page, from Setup (Salesforce Classic), enter Knowledge Article Types in the Quick Find box, and then select Knowledge Article Types.

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.

To configure a body mapping

  1. On the Sources (platform-ca | platform-eu | platform-au) page, click the Salesforce source you want to modify, and then click Edit in the Action bar.

  2. In the Configuration tab, select a Knowledge object or Article Type, and then click Body.

  3. Under Rules, enter the body mapping using the format specified in the following example.


    You want a Knowledge object to display the Knowledge article description, question, resolution, and summary.

    Under Rules, you enter the following mapping:

    • The Kav_ prefix must be added to all Salesforce field names when defining mapping rules for Knowledge objects or Article Types.

    • 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.

  4. Click Apply Changes.

    The changes will be effective once you have saved and rebuilt your source.

For more information, see View or Edit a Salesforce object body.

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 GroupName group.



<GROUP_API_NAME> represents the API name of the category group.


The category labels that can be used to find an article when performing a query.

The format used is compatible with hierarchical facets.



<GROUP_API_NAME> represents the API name of the category group.

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 (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

  1. Add an item type that matches the record type.

    The format for specifying the Item Type is:



    • <OBJECT_NAME> is the name of the Salesforce Object (for example, Knowledge)

    • <RECORD_TYPE> is the type of Salesforce record (for example, FAQ)



  2. Add a mapping rule to your source.

    • 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 limitation

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.


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.