ArticleType
All articles in Salesforce Knowledge are assigned to an article type. An article's type determines the type of content it contains, its appearance, and which users can access it. For example, a simple FAQ article type can have two custom fields, Question and Answer, where article managers enter data when creating or updating FAQ articles. A more complex article type can have dozens of fields organized into several sections. Using layouts and templates, administrators can structure the article type in the most effective way for its particular content. User access to article types is controlled by permissions. For each article type, an administrator can grant “Create,” “Read,” “Edit,” or “Delete” permissions to users. For example, the article manager can allow internal users to read, create, and edit FAQ article types, but let partner users only read FAQs. See “Knowledge Article Types” in the Salesforce online help and Knowledge in the SOAP API Developer Guide.
Declarative Metadata File Suffix and Directory Location
An ArticleType is defined as a custom object and is stored in the objects folder. ArticleTypes have a suffix __kav (instead of __c for custom objects). ArticleType field names have a suffix of __c like other custom objects, and must be dot-qualified with the name of the article type to which they belong. This is shown in the following sample package.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>articlefilemetadata</fullName>
<apiAccessLevel>Unrestricted</apiAccessLevel>
<types>
<members>newarticle__kav.description__c</members>
<name>CustomField</name>
</types>
<types>
<members>newarticle__kav</members>
<name>CustomObject</name>
</types>
</Package>
Version
ArticleTypes are available in API version 19.0 and later.
Fields
Field Name | Field Type | Description |
---|---|---|
articleTypeChannelDisplay | articleTypeChannelDisplay | Represents the article-type templates used to display an article in the various channels. See “Article Type Templates” in the Salesforce online help. |
deploymentStatus | DeploymentStatus (enumeration of type string) |
A string which represents the deployment status of a custom object or field. Valid values are:
|
description | string | A description of the article type. Maximum of 1000 characters. |
fields | CustomField[] | Represents one or more fields in the article type. |
gender | Gender | Indicates the gender of the noun that represents the object. This is used for languages where words need different treatment depending on their gender. |
label | string | Label that represents the object throughout the Salesforce user interface. |
pluralLabel | string | Plural version of the label value. |
startsWith | StartsWith (enumeration of type string) | Indicates whether the noun starts with a vowel, consonant, or is a special character. This is used for languages where words need different treatment depending on the first character. Valid values are listed in StartsWith. |
ArticleTypeChannelDisplay
Determines the article-type templates that are used to display an article in its channels. Unless otherwise noted, all fields are createable, filterable, and nillable.
Field Name | Field Type | Description |
---|---|---|
articleTypeTemplates | ArticleTypeTemplate[] | Indicates which article-type template applies in the specified channel. |
ArticleTypeTemplate
Sets the article-type template for a specific channel. If not specified, the default article-type template applies.
Declarative Metadata Sample Definitions
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<articleTypeChannelDisplay>
<articleTypeTemplates>
<channel>App</channel>
<template>Tab</template>
</articleTypeTemplates>
<articleTypeTemplates>
<channel>Prm</channel>
<template>Tab</template>
</articleTypeTemplates>
<articleTypeTemplates>
<channel>Csp</channel>
<template>Tab</template>
</articleTypeTemplates>
<articleTypeTemplates>
<channel>Pkb</channel>
<template>Toc</template>
</articleTypeTemplates>
</articleTypeChannelDisplay>
<deploymentStatus>Deployed</deploymentStatus>
<description>Article type with custom fields</description>
<fields>
<fullName>description__c</fullName>
<label>Description</label>
<length>48</length>
<type>Text</type>
</fields>
<label>newarticle</label>
<pluralLabel>newarticles</pluralLabel>
</CustomObject>