Newer Version Available

This content describes an older version of this product. View Latest

ArticleType

Represents the metadata associated with an article type. 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 might have two custom fields, Question and Answer, where article managers enter data when creating or updating FAQ articles. A more complex article type may require 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 might want to allow internal users to read, create, and edit FAQ article types, but let partner users only read FAQs. See “Managing Article Types” in the Salesforce online help and “Articles” in the SOAP API Developer's 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:

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <fullName>articlefilemetadata</fullName>
4    <apiAccessLevel>Unrestricted</apiAccessLevel>
5
6    <types>
7        <members>newarticle__kav.description__c</members>
8        <name>CustomField</name>
9    </types>
10    <types>
11        <members>newarticle__kav</members>
12        <name>CustomObject</name>
13    </types>
14
15</Package>

Version

ArticleTypes are available in API version 19.0 and later.

Fields

Field Name Field Type Description
articleTypeChannel​Display articleTypeChannelDisplay Represents the article-type templates used to display an article in the various channels. See “Assigning 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:
  • InDevelopment
  • Deployed
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. 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 articleTypeTemplates Indicates which article-type template applies in the specified channel.

articleTypeTemplates

Sets the article-type template for a specific channel. If not specified, the default article-type template applies.

Field Name Field Type Description
channel string Specifies the channel where the article-type template applies:
  • AllChannels: all the available channels.
  • App: the Articles tab in Salesforce Knowledge.
  • Pkb: the public knowledge base.
  • Csp: the Customer Portal.
  • Prm: the partner portal.

For more information about channels, see “Salesforce Knowledge Terminology” in the Salesforce online help.

page string Represents the name of the custom Visualforce page used as a custom article-type template. Use this field when you select Page in the template field.
template string Indicates the article-type template used for the specified channel:
  • Page: custom Visualforce page. When specifying this value, you must also set the page field with the Visualforce page name.
  • Tab: display the sections you defined in the layout as tabs.
  • Toc: display the sections you defined in the layout as table of content.

Declarative Metadata Sample Definitions

A sample article type definition follows:
1<?xml version="1.0" encoding="UTF-8"?>
2<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
3    <articleTypeChannelDisplay>
4        <articleTypeTemplates>
5            <channel>App</channel>
6            <template>Tab</template>
7        </articleTypeTemplates>
8        <articleTypeTemplates>
9            <channel>Prm</channel>
10            <template>Tab</template>
11        </articleTypeTemplates>
12        <articleTypeTemplates>
13            <channel>Csp</channel>
14            <template>Tab</template>
15        </articleTypeTemplates>
16        <articleTypeTemplates>
17            <channel>Pkb</channel>
18            <template>Toc</template>
19        </articleTypeTemplates>
20    </articleTypeChannelDisplay>
21    <deploymentStatus>Deployed</deploymentStatus>
22    <description>Article type with custom fields</description>
23    <fields>
24        <fullName>description__c</fullName>
25        <label>Description</label>
26        <length>48</length>
27        <type>Text</type>
28    </fields>
29    <label>newarticle</label>
30    <pluralLabel>newarticles</pluralLabel>
31</CustomObject>