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.

Prerequisites

Procedure

  1. On the Sources (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 check box to index all Knowledge objects.

    Note

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

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

    Example

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

    Under Rules, you enter the following mapping:

    <html><body>%[Kav_Description__c]<br>%[Kav_Question__c]<br>%[Kav_Resolution__c]<br>%[Kav_Summary]</body></html>
    Notes
    • 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

dc_GroupName

The article categories for the GroupName group.

sfdatacategory<GROUP_API_NAME>

Where:

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

dc_expanded_GroupName

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

The format used is compatible with hierarchical facets.

sfdatacategory<GROUP_API_NAME>expanded

Where:

<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 (e.g., 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>:<RECORD_TYPE>

    Where:

    • <OBJECT_NAME> is the name of the Salesforce Object (e.g., Knowledge)

    • <RECORD_TYPE> is the type of Salesforce record (e.g., FAQ)

      Example

      Knowledge:FAQ

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

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.

What's next for me?