Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
KnowledgeSuggestionFilter Class
Namespace
KnowledgeSuggestionFilter Methods
The following are methods for KnowledgeSuggestionFilter.
addArticleType(articleType)
Signature
public void addArticleType(String articleType)
Parameters
- articleType: Type: String A three-character ID prefix indicating the desired article type.
Return Value
Type: void
Usage
To add more than 1 article type, call the method multiple times.
addDataCategory(dataCategoryGroupName, dataCategoryName)
Signature
public void addDataCategory(String dataCategoryGroupName, String dataCategoryName)
Parameters
Return Value
Type: void
Usage
To set multiple data categories, call the method multiple times. The name of the data category group and name of the data category for desired articles, expressed as a mapping, for example, Search.KnowledgeSuggestionFilter.addDataCategory('Regions', 'Asia').
addTopic(topic)
Signature
public void addTopic(String topic)
Parameters
- addTopic: Type: String The name of the article topic.
Return Value
Type: void
Usage
To add more than 1 article topic, call the method multiple times.
setChannel(channelName)
Signature
public void setChannel(String channelName)
Parameters
-
channelName: Type: String The name of a channel. Valid values are:
- AllChannels–Visible in all channels the user has access to
- App–Visible in the internal Salesforce Knowledge application
- Pkb–Visible in the public knowledge base
- Csp–Visible in the Customer Portal
- Prm–Visible in the Partner Portal
If channel isn’t specified, the default value is determined by the type of user.
If channel is specified, the specified value may not be the actual value requested, because of certain requirements.
Return Value
Type: void
setDataCategories(dataCategoryFilters)
Signature
public void setDataCategories(Map dataCategoryFilters)
Parameters
- dataCategoryFilters: Type: Map A map of data category group and data category name pairs.
Return Value
Type: void
setLanguage(localeCode)
Signature
public void setLanguage(String localeCode)
Parameters
- localeCode: Type: String A locale code. For example, 'en_US' (English–United States), or 'es' (Spanish).
Return Value
Type: void
setPublishStatus(publishStatus)
Signature
public void setPublishStatus(String publishStatus)
Parameters
- publishStatus: Type: String A publish status. Valid values are:
- Draft–Articles aren’t published in Salesforce Knowledge.
- Online–Articles are published in Salesforce Knowledge.
- Archived–Articles aren’t published and are available in Archived Articles view.
setValidationStatus(validationStatus)
Signature
public void setValidationStatus(String validationStatus)
Parameters
- validationStatus: Type: String An article validation status. These values are available in the ValidationStatus field on the KnowledgeArticleVersion object.
Return Value
Type: void