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.- Pkb for a guest user
- Csp for a Customer Portal user
- Prm for a Partner Portal user
- App for any other type of user
If channel is specified, the specified value may not be the actual value requested, because of certain requirements.- For guest, Customer Portal, and Partner Portal users, the specified value must match the default value for each user type. If the values don’t match or AllChannels is specified, then App replaces the specified value.
- For all users other than guest, Customer Portal, and Partner Portal users:
- If Pkb, Csp, Prm, or App are specified, then the specified value is used.
- If AllChannels is specified, then App replaces the specified value.
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