Knowledge SOAP API Objects. salesforce Knowledge
Hirdetés
Hirdetés
Salesforce Knowledge SOAP API Knowledge SOAP API Objects
Knowledge SOAP API Objects
SOAP API object resources for working with Salesforce Knowledge.
IN THIS SECTION:
Article Type__DataCategorySelection
A data category selection represents a data category that classifies an article. This object is available in API version 19.0 and later.
Represents a single feed item in the feed displayed on the detail page for an article. This object is available in API version 20.0 and later.
Provides read-only access to an article and the ability to delete the master article. This object is available in API version 19.0 and later.
Provides a global view of standard article fields across all article types depending on their version. This object is available in API version 18.0 and later.
KnowledgeArticleVersionHistory
Enables read-only access to the full history of an article. This object is available in API version 25.0 and later.
Provides statistics on the number of views for the specified article across all article types. This object is read-only and available in API version 20 and later.
Provides the weighted rating for the specified article on a scale of 1 to 5 across all article types. This object is read-only and available in API version 20 and later.
Represents the association between a Case and a KnowledgeArticle. This object is available in API version 20.0 and later.
15
Salesforce Knowledge SOAP API Article Type__DataCategorySelection
Represents a Knowledge article that is attached to a record. This object is available in API version 37.0 and later.
Represents a single feed item on a linked Knowledge article attached to a record. This object is available in API version 37.0 and later.
Represents the history of changes made to tracked fields on a linked article. This object is available in API version 37.0 and later.
Represents a single feed item on a user's home tab. A Chatter feed shows recent changes to records that the user is following.
Represents records that the current user has recently viewed or referenced (by viewing a related record).
Represents a single feed item in the feed displayed on a report. This object is available in API version 20.0 and later.
Represents a promoted search term, which is one or more keywords that you associate with a Salesforce Knowledge article. When a user’s search query includes these keywords, the associated article is returned first in search results. This object is available in API version 31.0 and later.
Represents the assignment of a topic to a specific feed item, record, or file. This object is available in API version 28.0 and later.
Represents a user profile feed, which tracks all actions by a user on records that can be tracked in a feed. This feed is displayed on the user profile page.
Article Type
__DataCategorySelection
A data category selection represents a data category that classifies an article. This object is available in API version 19.0 and later.
This object can be used to associate an article with data categories from a data category group or to query the category selections for an article.
The object name is variable and has a syntax of Article Type __DataCategorySelection, where Article Type is the Object
Name
for the article type associated with the article. For example,
Offer__DataCategorySelection
represents the association between the
Offer
article type and its data categories. Every article is associated with an article type.
Supported Calls create() , delete() , describeSObjects() , query() , getDeleted() , retrieve()
Special Access Rules
Users can only access, create or delete data category selection visible to their role, permission set, or profile. If a user has partial visibility on an article's categorization, only the visible categories are returned.
16
Salesforce Knowledge SOAP API Article Type__DataCategorySelection
Fields
Field Name
DataCategoryGroupName
Details
Type
DataCategoryGroupReference
Properties
Create
Description
Unique name of the data category group which has categories associated with the article.
DataCategoryName
Type
DataCategoryGroupReference
Properties
Create
Description
Unique name of the data category associated with the article.
ParentId
Type reference
Properties
Create, Filter
Description
ID of the article associated with the data category selection.
Usage
Every article in Salesforce Knowledge can be categorized. A data category selection represents a category that has been selected to classify an article. You can use the Article Type __DataCategorySelection object to query and manage article categorization in your organization. Client applications can create a categorization for an article with a Draft status. They can also delete and query article categorizations.
Note: When using
Article Type
__DataCategorySelection to classify an article, you can't select both a category (for example
USA) and one of its descendants (California) or ascendant categories (North America). In this case, only the first category is selected.
Answer communities use QuestionDataCategorySelection to classify questions.
SOQL Sample
The following SOQL query returns the data category selections used to classify the article whose ID is ka0D000000005ApIAI .
SELECT Id,DataCategoryName, ParentId
FROM Offer__DataCategorySelection WHERE ParentId='ka0D000000005ApIAI'
This clause only returns category unique names. To retrieve category labels use the following clause:
SELECT Id,toLabel(DataCategoryName), ParentId
FROM Offer__DataCategorySelection WHERE ParentId='ka0D000000005ApIAI'
17
Salesforce Knowledge SOAP API Article Type__Feed
Tip: You can also use relationship queries to retrieve categorizations from an article type.
Article Type
__Feed
Represents a single feed item in the feed displayed on the detail page for an article. This object is available in API version 20.0 and later.
An article feed shows recent changes to an article record for any fields that are tracked in feeds, and posts and comments about the article. It is a useful way to stay up-to-date with changes made to articles in Salesforce Knowledge. This object is available in API version
20.0 and later. The object name is variable and uses a
Article Type
__Feed syntax, where
Article Type
is the
Object
Name for the article type associated with the article. For example, Offer__Feed represents a feed item on an article based on the
Offer article type.
Supported Calls delete()
, describeSObjects()
, getDeleted()
, getUpdated()
, query()
, retrieve()
Fields
Field
Body
CommentCount
Details
Type textarea
Properties
Nillable, Sort
Description
The content of Article Type __Feed. Required when Type is TextPost . Optional when Type is ContentPost or LinkPost . This field is the message that appears in the feed.
Type int
Properties
Filter, Group, Sort
Description
The number of FeedComments associated with this feed item.
Tip: In a feed that supports pre-moderation,
CommentCount
isn’t updated until a comment is published. For example, say you comment on a post that already has one published comment and your comment triggers moderation. Now there are two comments on the post, but the count says there's only one. In a moderated feed, your comment isn’t counted until it's approved by an admin or a person with
“CanApproveFeedPostAndComment” or “ModifyAllData” permission.
This has implications for how you retrieve feed comments. In a moderated feed, rather than retrieving comments by looping through CommentCount , go through pagination until end of comments is returned.
18
Salesforce Knowledge SOAP API
Field
ContentData
ContentDescription
ContentFileName
ContentSize
ContentType
CreatedDate
Article Type__Feed
Details
Type base64
Properties
Nillable
Description
Required if
Type
is
ContentPost
. Encoded file data in any format, and can’t be 0 bytes.
Setting this field automatically sets Type to ContentPost .
Type textarea
Properties
Nillable, Sort
Description
Available in API version 36.0 and earlier only. The description of the file specified in
ContentData .
Type string
Properties
Group, Nillable, Sort
Description
This field is required if
Type
is
ContentPost
.The name of the file uploaded to the feed.
Setting ContentFileName automatically sets Type to ContentPost .
Type int
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. The size of the file (in bytes) uploaded to the feed. This field is read-only and is automatically determined during insert.
Type string
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. The MIME type of the file uploaded to the feed.
This field is read-only and is automatically determined during insert.
Type dateTime
19
Salesforce Knowledge SOAP API
Field
FeedPostId
InsertedById
IsDeleted
IsRichText
Article Type__Feed
Details
Properties
Defaulted on create, Filter, Sort
Description
Date and time when this record was created. This field is a standard system field.
Ordering by CreatedDate DESC sorts the feed by the most recent feed item.
Type reference
Properties
Filter, Group, Nillable, Sort
Description
This field was removed in API version 22.0, and is available in earlier versions for backward compatibility only.
ID of the associated FeedPost. A FeedPost represents the following types of changes in an
FeedItem: changes to tracked fields, text posts, link posts, and content posts.
Type reference
Properties
Group, Nillable, Sort
Description
ID of the user who added this object to the feed. For example, if an application migrates posts and comments from another application into a feed, the InsertedBy value is set to the ID of the logged-in user.
Type boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Standard system field. Indicates whether the record has been moved to the Recycle Bin
( true
) or not ( false
).
Type boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the feed item
Body
contains rich text. Set
IsRichText
to true
if you post a rich text feed item via SOAP API. Otherwise, the post is rendered as plain text.
Rich text supports the following HTML tags:
20
Salesforce Knowledge SOAP API
Field
LastModifiedDate
LikeCount
LinkUrl
Article Type__Feed
Details
•
<p>
Tip: Though the <br> tag isn’t supported, you can use <p> </p> to create lines.
•
<b>
• <code>
•
<i>
•
<u>
• <s>
•
<ul>
•
<ol>
• <li>
• <img>
The
<img>
tag is accessible only via the API and must reference files in Salesforce similar to this example:
<img src="sfdc://069B0000000omjh"></img>
Note: In API version 35.0 and later, the system replaces special characters in rich text with escaped HTML. In API version 34.0 and prior, all rich text appears as a plain-text representation.
Type dateTime
Properties
Defaulted on create, Filter, Sort
Description
Date and time when a user last modified this record. This field is a standard system field.
When a feed item is created, LastModifiedDate is the same as CreatedDate . If a FeedComment is inserted on that feed item, then
LastModifiedDate
becomes the
CreatedDate
for that FeedComment. Deleting the FeedComment does not change the
LastModifiedDate .
Ordering by
LastModifiedDate DESC
sorts the feed by both the most recent feed item or comment.
Type int
Properties
Filter, Group, Sort
Description
The number of FeedLikes associated with this feed item.
Type url
21
Salesforce Knowledge SOAP API
Field
ParentId
RelatedRecordId
Title
Type
Article Type__Feed
Details
Properties
Nillable, Sort
Description
The URL of a
LinkPost
.
Type reference
Properties
Filter, Group, Sort
Description
ID of the article that is tracked in the feed. The feed is displayed on the detail page for this record.
Type reference
Properties
Group, Nillable, Sort
Description
ID of the ContentVersion object associated with a
ContentPost
. This field is null for all posts except
ContentPost
.
Type string
Properties
Group, Nillable, Sort
Description
The title of the feed item. When the
Type
is
LinkPost
, the
LinkUrl
is the URL and this field is the link name.
Type picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The type of feed item:
•
ActivityEvent
—indirectly generated event when a user or the API adds a Task associated with a feed-enabled parent record (excluding email tasks on cases). Also occurs when a user or the API adds or updates a Task or Event associated with a case record (excluding email and call logging).
For a recurring Task with CaseFeed disabled, one event is generated for the series only.
For a recurring Task with CaseFeed enabled, events are generated for the series and each occurrence.
22
Salesforce Knowledge SOAP API
Field
Article Type__Feed
Details
•
AdvancedTextPost
—created when a user posts a group announcement and, in
Lightning Experience as of API version 39.0 and later, when a user shares a post.
•
AnnouncementPost
—Not used.
• ApprovalPost —generated when a user submits an approval.
• BasicTemplateFeedItem —Not used.
•
CanvasPost
—a post made by a canvas app posted on a feed.
• CollaborationGroupCreated —generated when a user creates a public group.
• CollaborationGroupUnarchived —Not used.
•
ContentPost
—a post with an attached file.
• CreatedRecordEvent —generated when a user creates a record from the publisher.
• DashboardComponentAlert —generated when a dashboard metric or gauge exceeds a user-defined threshold.
• DashboardComponentSnapshot —created when a user posts a dashboard snapshot on a feed.
• LinkPost —a post with an attached URL.
• PollPost —a poll posted on a feed.
•
ProfileSkillPost
—generated when a skill is added to a user’s Chatter profile.
• QuestionPost —generated when a user posts a question.
• ReplyPost —generated when Chatter Answers posts a reply.
•
RypplePost
—generated when a user creates a Thanks badge in Work.com.
• TextPost —a direct text entry on a feed.
• TrackedChange —a change or group of changes to a tracked field.
•
UserStatus
—automatically generated when a user adds a post. Deprecated.
The following values appear in the Type picklist for all feed objects but apply only to
CaseFeed:
• CaseCommentPost —generated event when a user adds a case comment for a case object
• EmailMessageEvent —generated event when an email related to a case object is sent or received
•
CallLogPost
—generated event when a user logs a call for a case through the user interface. CTI calls also generate this event.
•
ChangeStatusPost
—generated event when a user changes the status of a case
• AttachArticleEvent —generated event when a user attaches an article to a case
Note: If you set Type to ContentPost , also specify ContentData and
ContentFileName .
23
Salesforce Knowledge SOAP API KnowledgeArticle
Usage
Use this object to track changes for an article. You can only delete a feed that you created, or if you have the “Modify All Data” permission or “Modify All” permission on the KnowledgeArticle object.
KnowledgeArticle
Provides read-only access to an article and the ability to delete the master article. This object is available in API version 19.0 and later.
Unlike KnowledgeArticleVersion, the ID of a KnowledgeArticle record is identical irrespective of the article's version (status). For more information on articles and article types, see “Work with Articles and Translations” and “Knowledge Article Types” in the Salesforce online help.
Supported Calls delete()
, describeSObjects()
, query()
, retrieve()
Special Access Rules
A user must have the “View Articles” permission enabled. Salesforce Knowledge users, unlike Customer Portal and partner portal users, must also be granted the
Knowledge User
feature license.
Fields
Field Name
ArchivedById
ArchivedDate
ArticleNumber
Details
Type reference
Properties
Filter, Group, Nillable, Sort
Description
The ID of the user who archived the article.
Type dateTime
Properties
Filter, Nillable, Sort
Description
The date when the article was archived.
Type string
Properties
Autonumber, Defaulted on create, Filter, Sort
24
Salesforce Knowledge SOAP API
Field Name
CaseAssociationCount
FirstPublishedDate
LastPublishedDate
LastReferencedDate
LastViewedDate
KnowledgeArticle
Details
Description
The unique number automatically assigned to the article when it's created. You can't change the format or value for this field.
Type int
Properties
Filter, Group, Sort
Description
The number of cases attached to the article.
Type dateTime
Properties
Filter, Nillable, Sort
Description
The date when the article was first published.
Type dateTime
Properties
Filter, Nillable, Sort
Description
The date when the article was last published.
Type date
Properties
Filter, Nillable, Sort, Update
Description
The timestamp for when the current user last viewed a record related to this record.
Type date
Properties
Filter, Nillable, Sort, Update
Description
The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced ( LastReferencedDate ) and not viewed.
25
Salesforce Knowledge SOAP API
Field Name
MasterLanguage
KnowledgeArticleVersion
Details
Type picklist
Properties
Filter, Restricted picklist
Description
The article's original language. Only accessible if your knowledge base supports multiple languages.
Usage
Use this object to query or retrieve articles. KnowledgeArticle can be used in a SOQL clause, but doesn’t provide access to the fields from the article. Provides read-only access to an article and the ability to delete the master article.
KnowledgeArticleVersion
Provides a global view of standard article fields across all article types depending on their version. This object is available in API version
18.0 and later.
Use this object to:
• Query or search generically across multiple article types.
• Filter on a specific version.
• Update standard fields, those fields that are updateable, in draft versions.
When you query on the archived article, the results include both the article and the article’s archived versions.
Note: You can’t update draft translations with the API.
Supported Calls create()
, delete()
, describeLayout()
, describeSObjects()
, query()
, retrieve()
, search()
, and update() .
Note:
• You can only update draft versions.
• To create, update, or delete a Knowledge article version, use the call on ArticleType_kav, where ArticleType is the name of the article’s type. For example, to delete, use ArticleType_kav.delete().
Special Access Rules
A user must have the “View Articles” permission enabled. Salesforce Knowledge users, unlike Customer Portal and partner portal users, must also be granted the Knowledge User feature license to view and edit article versions.
26
Salesforce Knowledge SOAP API
Fields
Field Name
ArchivedById
ArchivedDate
ArticleNumber
ArticleType
FirstPublishedDate
IsLatestVersion
KnowledgeArticleVersion
Details
Type reference
Properties
Filter, Nillable
Description
The ID of the user who archived the article.
Type dateTime
Properties
Filter, Nillable
Description
The date when the article was archived.
Type string
Properties
Autonumber, Defaulted on create, Filter
Description
The unique number automatically assigned to the article when it's created. You can't change the format or value for this field.
Type string
Properties
Defaulted on create,Filter
Description
Indicates the API Name of the article type. The ArticleType is assigned to the article when it's created. You can't change the value of this field. This field is available in API version 26.0 and later.
Type dateTime
Properties
Filter, Nillable
Description
The date when the article was first published.
Type boolean
27
Salesforce Knowledge SOAP API
Field Name
IsMasterLanguage
IsOutOfDate
IsVisibleInApp
IsVisibleInCsp
KnowledgeArticleVersion
Details
Properties
Defaulted on create, Group, Filter, Sort
Description
Indicates whether the article is the most current version. ( true
) or not ( false
).
This field can be true
on the online or published version, a draft version in the master language, a draft version in a translation, and the latest archived version.
However, you can’t filter by (PublishState=’Online’) and (IsLatestVersion=false) because the online version is also the latest version. This field is available in API version 24.0
and later.
Type boolean
Properties
Defaulted on create, Filter
Description
Indicates whether the article has one or more translations associated with it ( true
) or not ( false
). Only accessible if your knowledge base supports multiple languages.
Type boolean
Properties
Defaulted on create, Filter
Description
Indicates whether the source article has been updated since this translated version was created ( true ) or not ( false ). Only accessible if your knowledge base supports multiple languages.
Type boolean
Properties
Defaulted on create, Filter
Description
Required. Indicates whether the article is visible in the Articles tab ( true ) or not
( false
).
Type boolean
Properties
Defaulted on create, Filter
Description
Required. Indicates whether the article is visible in the Customer Portal ( true ) or not ( false
).
28
Salesforce Knowledge SOAP API
Field Name
IsVisibleInPkb
IsVisibleInPrm
KnowledgeArticleId
Language
LastPublishedDate
KnowledgeArticleVersion
Details
Type boolean
Properties
Defaulted on create, Filter
Description
Required. Indicates whether the article is visible in the public knowledge base ( true
) or not ( false ).
Type boolean
Properties
Defaulted on create, Filter
Description
Required. Indicates whether the article is visible in the partner portal ( true
) or not
( false ).
Type reference
Properties
Filter
Description
The ID of the article independent from its version. The value for this field is retrieved from the Id field of the KnowledgeArticle object.
Type picklist
Properties
Filter, Restricted picklist
Description
The language that the article is written in, such as
French
or
Chinese
(Traditional) .
Querying or searching articles in SOQL or SOSL requires that you specify the
Language field in the WHERE clause. The language must be the same for all article types.
Type dateTime
Properties
Filter, Nillable
Description
The date when the article was last published.
29
Salesforce Knowledge SOAP API
Field Name
MasterVersionId
OwnerId
PublishStatus
SourceId
Summary
KnowledgeArticleVersion
Details
Type reference
Properties
Filter, Nillable
Description
ID of the source article, if the article is the translation of a source article. Only accessible if your knowledge base supports multiple languages.
Type reference
Properties
Filter
Description
The ID of the article's owner.
Type picklist
Properties
Defaulted on create, Filter, Restricted picklist
Description
The publication status for the article:
• Draft : any draft articles.
•
Online
: articles published in Salesforce Knowledge.
•
Archived
: archived articles.
A user must have the “Manage Articles” permission enabled to use Online .
Querying or searching articles in SOQL or SOSL requires that you specify either the
PublishStatus or the Id field in the WHERE clause. You can search for only one publication status per article type in a single SOSL query. When searching for articles with a
PublishStatus
of
Archived
, also check that
IsLatestVersion equals false in your WHERE clause.
Type reference
Properties
Filter, Nillable
Description
ID of the source from which the article was created (Case or Reply).
Type textarea
30
Salesforce Knowledge SOAP API KnowledgeArticleVersion
Field Name
Title
TranslationCompletedDate
TranslationExportedDate
TranslationImportedDate
UrlName
Details
Properties
Filter, Nillable
Description
Summary of the article. Maximum size is 1000 characters.
Type string
Properties
Defaulted on create, Filter, idLookup
Description
Required. Article's title. Maximum size is 255 characters.
Type dateTime
Properties
Filter, Nillable
Description
Date and time when the article was last translated. Only accessible if your knowledge base supports multiple languages.
Type dateTime
Properties
Filter, Nillable
Description
Date and time when the article was last exported for translation. Only accessible if your knowledge base supports multiple languages.
Type dateTime
Properties
Filter, Nillable
Description
Date and time when the article was last imported for translation. Only accessible if your knowledge base supports multiple languages.
Type string
Properties
Filter
31
Salesforce Knowledge SOAP API
Field Name
ValidationStatus
VersionNumber
KnowledgeArticleVersion
Details
Description
Required. Represents the article's URL. Can contain alphanumeric characters and hyphens but can't begin or end with a hyphen.
UrlName
is case-sensitive and its maximum size is 255 characters.
Type picklist
Properties
Filter, Group
Description
Shows whether the content of the article has been validated. Default values are
Validated
and
Not Validated
. This field is available in API version 24.0 or later.
Type int
Properties
None
Description
The number assigned to a version of an article. This field is available in API version
24.0 and later.
Usage
Use this object to query, retrieve, or search for articles across all article types depending on their version. You can update draft master articles. Additionally, you can delete articles that are not drafts. Client applications can use KnowledgeArticleVersion with describeDataCategoryGroups() and describeDataCategoryGroupStructures() to return the category groups and the category structure associated with Salesforce Knowledge.
Alternatively, client applications can use the article type API Name followed by __kav to query, retrieve, or search for articles for a specific article type.
To access an article independent of its version, use the KnowledgeArticle object.
SOQL Samples
The following SOQL clause uses KnowledgeArticleVersion to query all published articles from all article types complying with the classification specified in the WITH DATA CATEGORY clause:
SELECT Title, Summary
FROM KnowledgeArticleVersion
WHERE PublishStatus='Online'
AND Language = 'en_US'
WITH DATA CATEGORY Geography__c ABOVE_OR_BELOW europe__c AND Product__c BELOW All__c
32
Salesforce Knowledge SOAP API KnowledgeArticleVersionHistory
The following SOQL clause uses the article type
API Name
to limit the query to all draft articles from the
Offer__kav
article type:
SELECT Id, Title
FROM Offer__kav
WHERE PublishStatus='Draft'
AND Language = 'en_US'
WITH DATA CATEGORY Geography__c AT (france__c,usa__c) AND Product__c ABOVE dsl__c
The following SOQL clause uses KnowledgeArticleVersion to query the Ids of all archived versions of a particular article:
SELECT Id
FROM KnowledgeArticleVersion
WHERE PublishStatus='Archived'
AND IsLatestVersion=false
AND KnowledgeArticleId='kA1D00000001PQ6KAM'
SOQL and SOSL with KnowledgeArticleVersion
• Always filter on a single value of PublishStatus unless the query filters on one or more primary key IDs. To support security, only users with the “Manage Articles” permission see articles whose PublishStatus value is Draft .
• Archived article versions are stored in the articletype_kav object. To query archived article versions, specify the article
Id
and set
IsLatestVersion='0' .
• Always filter on a single value of
Language
. However, in SOQL, you can filter on more than one
Language
if there is a filter on
Id or KnowledgeArticleId .
KnowledgeArticleVersionHistory
Enables read-only access to the full history of an article. This object is available in API version 25.0 and later.
Supported Calls describeSObjects()
, getDeleted()
, getUpdated()
, query()
, retrieve()
Special Access Rules
This object respects field, entity, and record-level security. You must have at least “Read” permission on the article type or the field to access its history. For data category security, Salesforce determines access based on the categorization of the online version of an article.
If there is no online version, then security is applied based on the archived version, followed by the security of the draft version.
Fields
Field Name
EventType
Details
Type picklist
Properties
Filter, Group, Restricted picklist, Sort
33
Salesforce Knowledge SOAP API
Field Name
FieldName
Language
NewValue
OldValue
ParentId
KnowledgeArticleVersionHistory
Details
Description
The type of event that is tracked in the history table.
Type picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Name of the tracked field.
Type picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
The language that the article is written in, such as
French
or
Chinese
(Traditional)
. Querying or searching articles in SOQL or SOSL requires that you specify the Language field in the WHERE clause. The language must be the same for all article types.
Type anyType
Properties
Nillable, Sort
Description
The new value of the field that was changed.
Type anyType
Properties
Nillable, Sort
Description
The most recent value of the field before it was changed.
Type reference
Properties
Filter, Group, Sort
Description
The ID of the article.
34
Salesforce Knowledge SOAP API
Field Name
ParentSobjectType
VersionId
VersionNumber
KnowledgeArticleViewStat
Details
Type picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
The type of object that contains the field.
Type reference
Properties
Filter, Group, Nillable, Sort
Description
The ID assigned to a version of the article.
Type int
Properties
Filter, Group, Sort
Description
The number assigned to a version of an article. This field is available in API version
24.0 and later.
Usage
Use this object to query events in the history of an article. For example, you can retrieve the number of edits a particular user has made to an article, how many times the article has been published, and so on.
KnowledgeArticleViewStat
Provides statistics on the number of views for the specified article across all article types. This object is read-only and available in API version 20 and later.
Supported Calls describeSObjects() , query() , retrieve()
Special Access Rules
Users must have access to the published version of an article to retrieve its views. For more information on published article version, see the PublishStatus field in KnowledgeArticleVersion.
35
Salesforce Knowledge SOAP API
Fields
Field Name
Channel
NormalizedScore
ParentId
ViewCount
KnowledgeArticleViewStat
Details
Type picklist
Properties
Filter, Restricted picklist
Description
The channel where the article is viewed:
•
AllChannels
for article views across all channels.
• App for the internal Salesforce Knowledge application.
• Pkb for article views in public knowledge base.
•
Csp
for Customer Portal.
• Prm for article view in partner portal.
Type double
Properties
Filter, Nillable
Description
Article's weighted views in the selected channel. The article with most views has a score of 100. Other article views are then calculated relative to this highest view score.
For example, if the best read article has 2000 views and another has 1000. The first one gets a score of 100 while the second gets 50.
Type reference
Properties
Filter
Description
ID of the viewed article. This corresponds to a KnowledgeArticle record.
Type int
Properties
Filter, Group, Sort
Description
The number of unique views an article has received in the selected channel. An article with a high number of views may not always have a high normalized score. The normalized score for an article is calculated based on views over time, with more recent views earning a higher score. This field is available in API version 27.0 and later.
36
Salesforce Knowledge SOAP API KnowledgeArticleVoteStat
Usage
Use this object to query or retrieve statistics for article views.
Alternatively, client applications can use the article type API Name followed by __ViewStat to query or retrieve most viewed articles from a specific article type.
SOQL Samples
The following SOQL clause uses KnowledgeArticleViewStat to query all the article views in Salesforce Knowledge and return the related articles:
SELECT Id, NormalizedScore, Parent.Id
FROM KnowledgeArticleViewStat where Channel = 'App'
ORDER BY NormalizedScore
Use the following clause to restrict your query to Offer articles for the
Offer
article type:
SELECT Id, NormalizedScore, Parent.Id
FROM Offer__ViewStat where Channel = 'App'
ORDER BY NormalizedScore
KnowledgeArticleVoteStat
Provides the weighted rating for the specified article on a scale of 1 to 5 across all article types. This object is read-only and available in
API version 20 and later.
Supported Calls describeSObjects() , query() , retrieve()
Special Access Rules
Users must have access to the published version of an article to retrieve its votes. For more information on published article version, see the
PublishStatus
field in KnowledgeArticleVersion
Fields
Field Name
Channel
Details
Type picklist
Properties
Filter, Restricted picklist
Description
The channel where the article is rated:
• AllChannels for article views across all channels.
•
App
for the internal Salesforce Knowledge application.
• Pkb for article views in public knowledge base.
37
Salesforce Knowledge SOAP API
Field Name
NormalizedScore
ParentId
CaseArticle
Details
•
Csp
for Customer Portal.
• Prm for article view in partner portal.
Type double
Properties
Filter, Nillable
Description
Article's weighted score on a scale of 1 to 5. A higher score means more votes. Articles without recent votes trend towards an average rating of three stars.
Type reference
Properties
Filter
Description
The rated article. This corresponds to a KnowledgeArticle record.
Usage
Use this object to query or retrieve the rating for an article.
Alternatively, client applications can use the article type
API Name
followed by
__VoteStat
to query or retrieve the rating for an article for a specific article type.
SOQL Samples
See KnowledgeArticleViewStat.
CaseArticle
Represents the association between a Case and a KnowledgeArticle. This object is available in API version 20.0 and later.
Supported Calls create()
, delete()
, describeSObjects()
, query()
, retrieve()
Special Access Rules
Access to this object is controlled by the parent Case and KnowledgeArticle. However, when querying, access is only controlled by the parent Case.
Customer Portal users can't access this object.
38
Salesforce Knowledge SOAP API CaseArticle
Fields
Field
ArticleLanguage
ArticleVersionNumber
CaseId
IsSharedByEmail
KnowledgeArticleId
Details
Type picklist
Properties
Filter, Restricted picklist
Description
The language of the article associated with the case.
Type int
Properties
Create, Group, Nillable
Description
The number assigned to a version of an article. This field is available in API version 24.0 and later.
Type reference
Properties
Create, Filter, Group, Sort
Description
ID of the Case associated with the KnowledgeArticle.
Type int
Properties
Create, Group, Nillable
Description
Indicates that the article has been shared with the customer through an email.
Type reference
Properties
Create, Filter, Group, Sort
Description
ID of the KnowledgeArticle associated with the Case.
39
Salesforce Knowledge SOAP API LinkedArticle
Usage
This object represents the association of a knowledge article with a Case. An article is associated with a case when it’s relevant to a specific issue, when it helps an agent solve the case, or when the agent sends the article to a customer.
You can use this object to include case-article associations in Apex and Visualforce.
You can't update this object via the API. If you attempt to create a record that matches an existing record, the create request simply returns the existing record.
LinkedArticle
Represents a Knowledge article that is attached to a record. This object is available in API version 37.0 and later.
As of Summer ’16, linked articles are supported only for work orders and work order line items.
Supported Calls create()
, delete()
, describeLayout()
, describeSObjects()
, getDeleted()
, getUpdated()
, query() , retrieve() , undelete() , update() , upsert()
Special Access Rules
Knowledge must be set up in your org.
Fields
Field Name
CurrencyIsoCode
KnowledgeArticleId
KnowledgeArticleVersionId
Details
Type picklist
Properties
Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Available only for orgs with the multicurrency feature enabled. Contains the ISO code for any currency allowed by the organization.
Type reference
Properties
Create, Filter, Group, Nillable, Sort
Description
The ID of the Knowledge article attached to the record. The label in the user interface is Knowledge Article ID.
Type reference
40
Salesforce Knowledge SOAP API
Field Name
LinkedEntityId
Name
RecordTypeId
Type
LinkedArticle
Details
Properties
Create, Filter, Group, Nillable, Sort
Description
The version of the Knowledge article attached to the record. This field lists the title of the attached version and links to the version. The label in the user interface is Article Version.
When you attach an article to a work order, that version of the article stays associated with the work order, even if later versions are published. If needed, you can detach and reattach an article to a work order to link the latest version.
Type reference
Properties
Create, Filter, Group, Nillable, Sort
Description
The ID of the record that the Knowledge article is attached to. The label in the user interface is Linked Record ID.
Type string
Properties
Create, Filter, Group, Sort, Update
Description
The title of the article. The label in the user interface is Article Title.
Type reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The ID of the article’s record type, if used.
Type string
Properties
Filter, Group, Nillable, Sort
Description
(Read only) The type of record that the Knowledge article is attached to. For example, work order. The label in the user interface is Linked Object Type.
41
Salesforce Knowledge SOAP API LinkedArticleFeed
Usage
Admins can customize linked articles’ page layouts, fields, validation rules, and more from the Linked Articles node in Setup under
Knowledge.
LinkedArticleFeed
Represents a single feed item on a linked Knowledge article attached to a record. This object is available in API version 37.0 and later.
As of Summer ’16, linked articles are supported only for work orders and work order line items.
Supported Calls delete()
, describeSObjects()
, getDeleted()
, getUpdated()
, query()
, retrieve()
Special Access Rules
Knowledge must be set up in your org.
Fields
Field Name
Body
CommentCount
InsertedById
Details
Type textarea
Properties
Nillable, Sort
Description
The content of the feed item. Required when
Type
is
TextPost
. Optional when Type is ContentPost or LinkPost .
Type int
Properties
Filter, Group, Sort
Description
The number of comments associated with the feed item.
Type reference
Properties
Group, Nillable, Sort
Description
ID of the user who added this object to the feed. For example, if an application migrates posts and comments from another application into a feed, the
InsertedBy
value is set to the ID of the logged-in user.
42
Salesforce Knowledge SOAP API
Field Name
IsRichText
LikeCount
LinkUrl
NetworkScope
LinkedArticleFeed
Details
Type boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the feed item
Body
contains rich text. Set
IsRichText to true if you post a rich text feed item via the SOAP API. Otherwise, the post is rendered as plain text.
Rich text supports the following HTML tags.
•
<p>
Tip: Although the
<br>
tag isn’t supported, you can use
<p> </p>
to create lines.
•
<b>
• <i>
• <u>
•
<s>
• <ul>
• <ol>
•
<li>
• <img>
The
<img>
tag is accessible only via the API and must reference files in
Salesforce similar to this example: <img src="sfdc://069B0000000omjh"></img>
Type int
Properties
Filter, Group, Sort
Description
The number of Likes associated with the feed item.
Type url
Properties
Nillable, Sort
Description
The URL of a LinkPost .
Type picklist
43
Salesforce Knowledge SOAP API
Field Name
ParentId
RelatedRecordId
Title
Type
Visibility
LinkedArticleFeed
Details
Properties
Group, Nillable, Restricted picklist, Sort
Description
Specifies whether the feed item is available in the default community, a specific community, or all communities.
Type reference
Properties
Filter, Group, Sort
Description
The ID of the object type to which the feed item is related. For example, set this field to a UserId to post to someone’s profile feed. Or set it to an AccountId to post to a specific account.
Type reference
Properties
Group, Nillable, Sort
Description
The ID of the
ContentVersion
object associated with a content post. This field is null for all posts, except
ContentPost
.
Type string
Properties
Group, Nillable, Sort
Description
The title of the feed item. When the
Type
is
LinkPost
, the
LinkUrl
is the URL, and this field is the link name.
Type picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The type of feed item.
Type picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
44
Salesforce Knowledge SOAP API
Field Name
LinkedArticleHistory
Details
Description
Specifies whether this feed item is available to all users or only internal users.
LinkedArticleHistory
Represents the history of changes made to tracked fields on a linked article. This object is available in API version 37.0 and later.
As of Summer ’16, linked articles are supported only for work orders and work order line items.
Supported Calls describeSObjects() , getDeleted() , getUpdated() , query() , retrieve()
Special Access Rules
Knowledge must be set up in your org.
Fields
Field Name
Field
LinkedArticleId
NewValue
Details
Type picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
The name of the field that was changed.
Type reference
Properties
Filter, Group, Sort
Description
The ID of the tracked linked article. The history is displayed on the detail page for this record.
Type anyType
Properties
Nillable, Sort
Description
The new value of the field that was changed.
45
Salesforce Knowledge SOAP API
Field Name
OldValue
Details
Type anyType
Properties
Nillable, Sort
Description
The value of the field before it was changed.
NewsFeed
NewsFeed
Represents a single feed item on a user's home tab. A Chatter feed shows recent changes to records that the user is following.
NewsFeed is available in API version 18.0 through API version 26.0. In API version 27.0 and later, NewsFeed is no longer available in the
SOAP API. Use the Chatter REST API to access NewsFeed.
Supported Calls delete() , describeSObjects() , getDeleted() , getUpdated() , query() , retrieve()
Fields
Field
Body
CommentCount
Details
Type textarea
Properties
Nillable, Sort
Description
The content of NewsFeed. Required when
Type
is
TextPost
. Optional when
Type
is
ContentPost
or
LinkPost
. This is the message that appears in the feed.
Type int
Properties
Filter, Group, Sort
Description
The number of FeedComments associated with this feed item.
Tip: In a feed that supports pre-moderation,
CommentCount
isn’t updated until a comment is published. For example, say you comment on a post that already has one published comment and your comment triggers moderation. Now there are two comments on the post, but the count says there's only one. In a moderated feed, your comment isn’t counted until it's approved by an admin or a person with
“CanApproveFeedPostAndComment” or “ModifyAllData” permission.
46
Salesforce Knowledge SOAP API
Field
ConnectionId
ContentData
ContentDescription
ContentFileName
ContentSize
NewsFeed
Details
This has implications for how you retrieve feed comments. In a moderated feed, rather than retrieving comments by looping through
CommentCount
, go through pagination until end of comments is returned.
Type reference
Properties
Filter, Group, Nillable, Sort
Description
When a PartnerNetworkConnection makes a change to a record that is tracked, the
CreatedBy
field contains the ID of the system administrator while the
ConnectionId contains the ID of the PartnerNetworkConnection that made the change. Available if Salesforce to Salesforce is enabled for your organization.
Type base64
Properties
Nillable
Description
Available in API version 36.0 and earlier only.Required if Type is ContentPost . Encoded file data in any format, and can’t be 0 bytes. Setting this field automatically sets
Type
to
ContentPost
.
Type textarea
Properties
Nillable, Sort
Description
Available in API version 36.0 and earlier only.The description of the file specified in
ContentData
.
Type string
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only.This field is required if
Type
is
ContentPost
.
The name of the file uploaded to the feed. Setting
ContentFileName
automatically sets Type to ContentPost .
Type int
47
Salesforce Knowledge SOAP API
Field
ContentType
CreatedDate
FeedPostId
InsertedById
NewsFeed
Details
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. The size of the file (in bytes) uploaded to the feed. This field is read-only and is automatically determined during insert.
Type string
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. The MIME type of the file uploaded to the feed.
This field is read-only and is automatically determined during insert.
Type dateTime
Properties
Defaulted on create, Filter, Sort
Description
Date and time when this record was created. This is a standard system field.
Ordering by CreatedDateDESC sorts the feed by the most recent feed item.
Type reference
Properties
Filter, Group, Nillable, Sort
Description
This field was removed in API version 22.0, and is available in earlier versions for backward compatibility only.
ID of the associated FeedPost. A FeedPost represents the following types of changes in an
FeedItem: changes to tracked fields, text posts, link posts, and content posts.
Type reference
Properties
Group, Nillable, Sort
Description
ID of the user who added this object to the feed. For example, if an application migrates posts and comments from another application into a feed, the InsertedBy value is set to the ID of the logged-in user.
48
Salesforce Knowledge SOAP API
Field
IsDeleted
LastModifiedDate
LikeCount
LinkUrl
NetworkScope
NewsFeed
Details
Type boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Standard system field. Indicates whether the record has been moved to the Recycle Bin
( true ) or not ( false ).
Type dateTime
Properties
Defaulted on create, Filter, Sort
Description
Date and time when a user last modified this record. This field is a standard system field.
When a feed item is created,
LastModifiedDate
is the same as
CreatedDate
. If a FeedComment is inserted on that feed item, then LastModifiedDate becomes the
CreatedDate for that FeedComment. Deleting the FeedComment does not change the
LastModifiedDate
.
Ordering by LastModifiedDate DESC sorts the feed by both the most recent feed item or comment.
Type int
Properties
Filter, Group, Sort
Description
The number of FeedLikes associated with this feed item.
Type url
Properties
Nillable, Sort
Description
The URL of a LinkPost .
Type picklist
Properties
Group, Nillable, Restricted picklist, Sort
49
Salesforce Knowledge SOAP API
Field
ParentId
RelatedRecordId
Title
Type
NewsFeed
Details
Description
Specifies whether this feed item is available in the default community, a specific community, or all communities. This field is available in API version 26.0 and later, if Salesforce Communities is enabled for your organization.
NetworkScope can have the following values:
•
NetworkId
—The ID of the community in which the FeedItem is available. If left empty, the feed item is only available in the default community.
•
AllNetworks
—The feed item is available in all communities.
Note the following exceptions for NetworkScope :
• Only feed items with a Group or User parent can set a
NetworkId
or a null value for
NetworkScope
.
• For feed items with a record parent, users can set
NetworkScope
only to
AllNetworks
.
• You can’t filter a FeedItem on the
NetworkScope
field.
Type reference
Properties
Filter, Group, Sort
Description
ID of the newsfeed record that is tracked in the feed. The feed is displayed on the detail page for this record.
Type reference
Properties
Group, Nillable, Sort
Description
ID of the ContentVersion object associated with a
ContentPost
. This field is null for all posts except ContentPost .
Type string
Properties
Group, Nillable, Sort
Description
The title of the feed item. When the
Type
is
LinkPost
, the
LinkUrl
is the URL and this field is the link name.
Type picklist
50
Salesforce Knowledge SOAP API
Field Details
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The type of feed item:
• ActivityEvent —indirectly generated event when a user or the API adds a Task associated with a feed-enabled parent record (excluding email tasks on cases). Also occurs when a user or the API adds or updates a Task or Event associated with a case record (excluding email and call logging).
For a recurring Task with CaseFeed disabled, one event is generated for the series only.
For a recurring Task with CaseFeed enabled, events are generated for the series and each occurrence.
• AdvancedTextPost —created when a user posts a group announcement and, in
Lightning Experience as of API version 39.0 and later, when a user shares a post.
•
AnnouncementPost
—Not used.
• ApprovalPost —generated when a user submits an approval.
•
BasicTemplateFeedItem
—Not used.
•
CanvasPost
—a post made by a canvas app posted on a feed.
• CollaborationGroupCreated —generated when a user creates a public group.
•
CollaborationGroupUnarchived
—Not used.
•
ContentPost
—a post with an attached file.
• CreatedRecordEvent —generated when a user creates a record from the publisher.
•
DashboardComponentAlert
—generated when a dashboard metric or gauge exceeds a user-defined threshold.
• DashboardComponentSnapshot —created when a user posts a dashboard snapshot on a feed.
• LinkPost —a post with an attached URL.
•
PollPost
—a poll posted on a feed.
•
ProfileSkillPost
—generated when a skill is added to a user’s Chatter profile.
• QuestionPost —generated when a user posts a question.
• ReplyPost —generated when Chatter Answers posts a reply.
•
RypplePost
—generated when a user creates a Thanks badge in Work.com.
• TextPost —a direct text entry on a feed.
• TrackedChange —a change or group of changes to a tracked field.
•
UserStatus
—automatically generated when a user adds a post. Deprecated.
The following values appear in the Type picklist for all feed objects but apply only to
CaseFeed:
• CaseCommentPost —generated event when a user adds a case comment for a case object
• EmailMessageEvent —generated event when an email related to a case object is sent or received
51
NewsFeed
Salesforce Knowledge SOAP API
Field
Visibility
NewsFeed
Details
•
CallLogPost
—generated event when a user logs a call for a case through the user interface. This event is also generated by CTI calls.
•
ChangeStatusPost
—generated event when a user changes the status of a case
• AttachArticleEvent —generated event when a user attaches an article to a case
Note: If you set Type to ContentPost , you must specify ContentData and ContentFileName .
Type picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Specifies whether this feed item is available to all users or internal users only. This field is available in API version 26.0 and later, if Salesforce Communities is enabled for your organization.
Visibility
can have the following values:
• AllUsers —The feed item is available to all users who have permission to see the feed item.
•
InternalUsers
—The feed item is available to internal users only.
Note the following exceptions for Visibility :
• For record posts,
Visibility
is set to
InternalUsers
for all internal users by default.
• External users can set
Visibility
only to
AllUsers
.
• On user and group posts, only internal users can set Visibility to
InternalUsers
.
Usage
Use this object to query and retrieve record changes tracked in a news feed. Note the following when working with news feeds:
• This object is read only in the API.
• Users can only query their own news feed.
• Queries retrieve feed items that include mentions from other users.
• Use this object to query and retrieve lead feed items that were associated with a converted lead record.
Users that do not have the “View All Data” permission have the following limitations when querying records:
• Must specify a LIMIT clause and the limit must be less than or equal to 1000.
• May include a
WHERE
clause that references NewsFeed fields, but may not include references to fields in related objects. For example, you can filter by
CreatedDate
or
ParentId
, but not by
Parent.Name
.
• May include an
ORDER BY
clause that references NewsFeed fields, but may not include references to fields in related objects. For example, you can
ORDER BY CreatedDate
or
ParentId
, but not by
Parent.Name
.
52
Salesforce Knowledge SOAP API RecentlyViewed
Tip: To query for the most recent feed items, you should
ORDER BY CreatedDate DESC, Id DESC
.
Note the following SOQL restrictions.
• No SOQL limit if logged-in user has “View All Data” permission. If not, specify a LIMIT clause of 1,000 records or fewer.
• SOQL ORDER BY on fields using relationships is not available. Use ORDER BY on fields on the root object in the SOQL query.
RecentlyViewed
Represents records that the current user has recently viewed or referenced (by viewing a related record).
Supported Calls query() , update()
Special Usage Rules
The RecentlyViewed object does not support the Report, KnowledgeArticle, and Article objects.
Fields
Field
Alias
FirstName
Details
Type string
Properties
Filter, Group, Nillable, Sort
Description
The alias on the record.
Type email
Properties
Filter, Group, Nillable, Sort
Description
The email address on the record.
Type string
Properties
Filter, Group, Nillable, Sort
Description
The first name on the record. If the recently viewed record is a user, this is the user’s first name.
53
Salesforce Knowledge SOAP API
Field
Id
IsActive
LastName
LastReferencedDate
LastViewedDate
Name
RecentlyViewed
Details
Type
ID
Properties
Defaulted on create, Filter, Group, Sort
Description
The ID of the recently viewed record.
Type boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the recently viewed record is an active user ( true
) or not ( false
). This field contains a value only if the recently viewed record is a user.
Type string
Properties
Filter, Group, Nillable, Sort
Description
The last name on the record.
Type dateTime
Properties
Filter, Nillable, Sort, Update
Description
The timestamp for when the current user last viewed a record related to this record.
Type dateTime
Properties
Filter, Nillable, Sort, Update
Description
The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced ( LastReferencedDate ) and not viewed.
Type string
Properties
Filter, Group, Nillable, Sort
54
Salesforce Knowledge SOAP API
Field
NetworkId
Phone
ProfileId
Title
Type
RecentlyViewed
Details
Description
The name on the recently viewed record. If the recently viewed record is a user, contact, or lead, the value is a concatenation of the firstname
and lastname
field values.
Type reference
Properties
Filter, Group, Nillable, Sort
Description
ID of the community that this group is part of. This field is available only if Salesforce
Communities is enabled in your organization.
You can add a
NetworkId
only when creating a group. You can’t change or add a
NetworkId for an existing group. This field is available in API version 27.0 and later.
Type phone
Properties
Filter, Group, Nillable, Sort
Description
The phone number on the record.
Type reference
Properties
Filter, Group, Nillable, Sort
Description
If the recently viewed record is a user, this is the user’s profile ID.
Type string
Properties
Filter, Group, Nillable, Sort
Description
If the recently viewed record is a user, this is the title of the user; for example CFO or CEO.
Type picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The sObject type for this recently viewed record. Valid values include any standard or custom objects that RecentlyViewed supports.
55
Salesforce Knowledge SOAP API
Field
UserRoleId
Details
Type reference
Properties
Filter, Group, Nillable, Sort
Description
The ID of the user role associated with this object.
ReportFeed
Usage
This object provides a heterogeneous list of different object types and consists of recently viewed records or records that were recently referenced (a related record was viewed). A record is considered viewed when the user sees the details associated with it, but not when the user sees it in a list with other records. Use this object to programmatically construct a list of recently viewed items specific to the current user, for example, on a custom user interface or for search auto-complete options. You can also retrieve a filtered list of records by object type ( Type ). The RecentlyViewed data is periodically truncated down to 200 records per object.
Use this query in your code to retrieve a list of all the records that were recently viewed. The results are ordered from most to least recent.
SELECT Id, Name
FROM RecentlyViewed
WHERE LastViewedDate !=null
ORDER BY LastViewedDate DESC
Use this query to retrieve data that was either viewed or referenced, but only for a limited set of objects.
SELECT Id, Name
FROM RecentlyViewed
WHERE Type IN ('Account', 'Contact', 'Plan__c')
ORDER BY LastViewedDate DESC
This query retrieves a list of all recently viewed contacts with contact-specific fields, such as the contact’s account name, and the custom website field. Records are ordered from most to least recent.
SELECT Account.Name, Title, Email, Phone, Website__c
FROM Contact
WHERE LastViewedDate != NULL
ORDER BY LastViewedDate DESC
ReportFeed
Represents a single feed item in the feed displayed on a report. This object is available in API version 20.0 and later.
Supported Calls delete() , describeSObjects() , getDeleted() , getUpdated() , query() , retrieve()
Special Access Rules
You can delete all feed items you created. To delete feed items you didn’t create, you must have one of these permissions:
56
Salesforce Knowledge SOAP API
• “Modify All Data”
• “Moderate Chatter”
Note: Users with the “Moderate Chatter” permission can delete only the feed items and comments they see.
Fields
Field
Body
CommentCount
ConnectionId
ReportFeed
Details
Type textarea
Properties
Nillable, Sort
Description
The content of ReportFeed. Required when
Type
is
TextPost
. Optional when
Type is
ContentPost
or
LinkPost
. This field is the message that appears in the feed.
Type int
Properties
Filter, Group, Sort
Description
The number of FeedComments associated with this feed item.
Tip: In a feed that supports pre-moderation,
CommentCount
isn’t updated until a comment is published. For example, say you comment on a post that already has one published comment and your comment triggers moderation. Now there are two comments on the post, but the count says there's only one. In a moderated feed, your comment isn’t counted until it's approved by an admin or a person with
“CanApproveFeedPostAndComment” or “ModifyAllData” permission.
This has implications for how you retrieve feed comments. In a moderated feed, rather than retrieving comments by looping through CommentCount , go through pagination until end of comments is returned.
Type reference
Properties
Filter, Group, Nillable, Sort
Description
When a PartnerNetworkConnection modifies a record that is tracked, the
CreatedBy
field contains the ID of the system administrator. The
ConnectionId
contains the ID of the
PartnerNetworkConnection. Available if Salesforce to Salesforce is enabled for your organization.
57
Salesforce Knowledge SOAP API
Field
ContentData
ContentDescription
ContentFileName
ContentSize
ContentType
ReportFeed
Details
Type base64
Properties
Nillable
Description
Available in API version 36.0 and earlier only. Required if
Type
is
ContentPost
. Encoded file data in any format, and can’t be 0 bytes. Setting this field automatically sets Type to
ContentPost .
Type textarea
Properties
Nillable, Sort
Description
Available in API version 36.0 and earlier only. The description of the file specified in
ContentData
.
Type string
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. This field is required if Type is ContentPost .
The name of the file uploaded to the feed. Setting
ContentFileName
automatically sets
Type
to
ContentPost
.
Type int
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. The size of the file (in bytes) uploaded to the feed. This field is read-only and is automatically determined during insert.
Type string
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. The MIME type of the file uploaded to the feed.
This field is read-only and is automatically determined during insert.
58
Salesforce Knowledge SOAP API
Field
CreatedDate
FeedPostId
InsertedById
IsDeleted
IsRichText
ReportFeed
Details
Type dateTime
Properties
Defaulted on create, Filter, Sort
Description
Date and time when this record was created. This field is a standard system field.
Ordering by
CreatedDateDESC
sorts the feed by the most recent feed item.
Type reference
Properties
Filter, Group, Nillable, Sort
Description
This field was removed in API version 22.0, and is available in earlier versions for backward compatibility only.
ID of the associated FeedPost. A FeedPost represents the following types of changes in an
FeedItem: changes to tracked fields, text posts, link posts, and content posts.
Type reference
Properties
Group, Nillable, Sort
Description
ID of the user who added this object to the feed. For example, if an application migrates posts and comments from another application into a feed, the InsertedBy value is set to the ID of the logged-in user.
Type boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Standard system field. Indicates whether the record has been moved to the Recycle Bin
( true ) or not ( false ).
Type boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the feed item
Body
contains rich text. Set
IsRichText
to true
if you post a rich text feed item via SOAP API. Otherwise, the post is rendered as plain text.
59
Salesforce Knowledge SOAP API
Field
LastModifiedDate
LikeCount
ReportFeed
Details
Rich text supports the following HTML tags:
• <p>
Tip: Though the
<br>
tag isn’t supported, you can use
<p> </p> to create lines.
• <b>
• <code>
•
<i>
• <u>
• <s>
•
<ul>
• <ol>
• <li>
•
<img>
The <img> tag is accessible only via the API and must reference files in Salesforce similar to this example:
<img src="sfdc://069B0000000omjh"></img>
Note: In API version 35.0 and later, the system replaces special characters in rich text with escaped HTML. In API version 34.0 and prior, all rich text appears as a plain-text representation.
Type dateTime
Properties
Defaulted on create, Filter, Sort
Description
Date and time when a user last modified this record. This field is a standard system field.
When a feed item is created, LastModifiedDate is the same as CreatedDate . If a FeedComment is inserted on that feed item, then
LastModifiedDate
becomes the
CreatedDate
for that FeedComment. Deleting the FeedComment does not change the
LastModifiedDate .
Ordering by
LastModifiedDate DESC
sorts the feed by both the most recent feed item or comment.
Type int
Properties
Filter, Group, Sort
Description
The number of FeedLikes associated with this feed item.
60
Salesforce Knowledge SOAP API
Field
LinkUrl
NetworkScope
ParentId
RelatedRecordId
ReportFeed
Details
Type url
Properties
Nillable, Sort
Description
The URL of a
LinkPost
.
Type picklist
Properties
Group, Nillable, Restricted picklist, Sort
Description
Specifies whether this feed item is available in the default community, a specific community, or all communities. This field is available in API version 26.0 and later, if Salesforce Communities is enabled for your organization.
NetworkScope can have the following values:
•
NetworkId
—The ID of the community in which the FeedItem is available. If left empty, the feed item is only available in the default community.
•
AllNetworks
—The feed item is available in all communities.
Note the following exceptions for NetworkScope :
• Only feed items with a Group or User parent can set a
NetworkId
or a null value for
NetworkScope .
• For feed items with a record parent, users can set
NetworkScope
only to
AllNetworks .
• You can’t filter a FeedItem on the
NetworkScope
field.
Type reference
Properties
Filter, Group, Sort
Description
ID of the account record that is tracked in the feed. The feed is displayed on the detail page for this record.
Type reference
Properties
Group, Nillable, Sort
Description
ID of the ContentVersion object associated with a ContentPost . This field is null for all posts except ContentPost .
61
Salesforce Knowledge SOAP API
Field
Title
Type
ReportFeed
Details
Type string
Properties
Group, Nillable, Sort
Description
The title of the report record. When the
Type
is
LinkPost
, the
LinkUrl
is the URL and this field is the link name.
Type picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The type of feed item:
•
ActivityEvent
—indirectly generated event when a user or the API adds a Task associated with a feed-enabled parent record (excluding email tasks on cases). Also occurs when a user or the API adds or updates a Task or Event associated with a case record (excluding email and call logging).
For a recurring Task with CaseFeed disabled, one event is generated for the series only.
For a recurring Task with CaseFeed enabled, events are generated for the series and each occurrence.
•
AdvancedTextPost
—created when a user posts a group announcement and, in
Lightning Experience as of API version 39.0 and later, when a user shares a post.
• AnnouncementPost —Not used.
•
ApprovalPost
—generated when a user submits an approval.
• BasicTemplateFeedItem —Not used.
• CanvasPost —a post made by a canvas app posted on a feed.
•
CollaborationGroupCreated
—generated when a user creates a public group.
• CollaborationGroupUnarchived —Not used.
• ContentPost —a post with an attached file.
•
CreatedRecordEvent
—generated when a user creates a record from the publisher.
• DashboardComponentAlert —generated when a dashboard metric or gauge exceeds a user-defined threshold.
•
DashboardComponentSnapshot
—created when a user posts a dashboard snapshot on a feed.
•
LinkPost
—a post with an attached URL.
• PollPost —a poll posted on a feed.
• ProfileSkillPost —generated when a skill is added to a user’s Chatter profile.
•
QuestionPost
—generated when a user posts a question.
•
ReplyPost
—generated when Chatter Answers posts a reply.
62
Salesforce Knowledge SOAP API
Field
Visibility
ReportFeed
Details
•
RypplePost
—generated when a user creates a Thanks badge in Work.com.
• TextPost —a direct text entry on a feed.
•
TrackedChange
—a change or group of changes to a tracked field.
•
UserStatus
—automatically generated when a user adds a post. Deprecated.
The following values appear in the Type picklist for all feed objects but apply only to
CaseFeed:
• CaseCommentPost —generated event when a user adds a case comment for a case object
• EmailMessageEvent —generated event when an email related to a case object is sent or received
• CallLogPost —generated event when a user logs a call for a case through the user interface. CTI calls also generate this event.
•
ChangeStatusPost
—generated event when a user changes the status of a case
• AttachArticleEvent —generated event when a user attaches an article to a case
Note: If you set
Type
to
ContentPost
, also specify
ContentData
and
ContentFileName .
Type picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Specifies whether this feed item is available to all users or internal users only. This field is available in API version 26.0 and later, if Salesforce Communities is enabled for your organization.
Visibility
can have the following values:
• AllUsers —The feed item is available to all users who have permission to see the feed item.
• InternalUsers —The feed item is available to internal users only.
Note the following exceptions for
Visibility
:
• For record posts, Visibility is set to InternalUsers for all internal users by default.
• External users can set
Visibility
only to
AllUsers
.
• On user and group posts, only internal users can set Visibility to
InternalUsers
.
Usage
Use this object to retrieve the current contents of the feed fields, such as type of feed or feed ID.
63
Salesforce Knowledge SOAP API SearchPromotionRule
SearchPromotionRule
Represents a promoted search term, which is one or more keywords that you associate with a Salesforce Knowledge article. When a user’s search query includes these keywords, the associated article is returned first in search results. This object is available in API version
31.0 and later.
Supported Calls create() , delete() , describeSObjects() , getDeleted() , getUpdated() , query() , retrieve() , undelete() , update() , upsert()
Special Access Rules
A user must have the “Manage Promoted Search Terms” permission.
Fields
Field Name
PromotedEntityId
Query
Details
Type reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The ID of the KnowledgeArticleVersion that the promoted search term is associated with. The article must be in published status.
Type string
Properties
Create, Filter, Group, Sort, Update
Description
The text of the promoted search term. Maximum length: 100 characters.
You can associate the same promoted search term with multiple articles. If the user’s search matches the promoted term, all associated articles are promoted in search results, ordered by relevancy. For best results, create promoted search terms selectively and limit the number of articles that are promoted per term.
Usage
Use this object to optimize article search results in Salesforce Knowledge.
TopicAssignment
Represents the assignment of a topic to a specific feed item, record, or file. This object is available in API version 28.0 and later.
64
Salesforce Knowledge SOAP API TopicAssignment
Administrators must enable topics for objects before users can add topics to records of that object type. Topics for most objects are available in API version 30.0 and later. Topics for ContentDocument are available in API version 37.0 and later.
Supported Calls create()
, describeSObjects()
, query()
, retrieve()
Fields
Field Name
EntityId
EntityKeyPrefix
EntityType
NetworkId
Details
Type reference
Properties
Create, Filter, Group, Sort
Description
Identifier of the feed item, record, or file.
Type string
Properties
Filter, Group, idLookup, Sort
Description
The first three digits of the EntityID field, which identify the object type
(account, opportunity, etc). This read-only field is available in API version 32.0
and later.
Interface label is “Record Key Prefix,” which appears only in reports.
Type string
Properties
Filter, Group, Nillable, Sort
Description
The standard name for the object type (account, opportunity, etc). This read-only field is available in API version 33.0 and later.
Interface label is “Object Type,” which appears only in reports.
Tip: In most cases, you should use this field rather than
EntityKeyPrefix , which exists primarily to support older reports.
Type reference
Properties
Create, Filter, Group, Nillable, Sort
65
Salesforce Knowledge SOAP API
Field Name
TopicId
UserProfileFeed
Details
Description
Identifier of the community to which the TopicAssignment belongs. This field is available only if Salesforce Communities is enabled in your organization.
Type reference
Properties
Create, Filter, Group, Sort
Description
Identifier of the topic.
Usage
Use this object to query the assignments of topics to feed items, records, or files. To assign or remove topics, you must have the “Assign
Topics” permission.
In SOQL
SELECT
syntax, this object supports nested semi-joins, allowing queries on Knowledge articles assigned to specific topics.
For example:
SELECT parentId FROM KnowledgeArticleViewStat
WHERE parentId in (SELECT KnowledgeArticleId FROM KnowledgeArticleVersion
WHERE publishStatus = 'Online' AND language = 'en_US'
AND Id in (select EntityId from TopicAssignment where TopicId ='0T0xx0000000xxx'))
No SOQL limit if logged-in user has “View All Data” permission. If not, do one of the following:
• Specify a LIMIT clause of 1,100 records or fewer.
• Filter on Id or Entity when using a WHERE clause with "=".
UserProfileFeed
Represents a user profile feed, which tracks all actions by a user on records that can be tracked in a feed. This feed is displayed on the user profile page.
UserProfileFeed is available in API version 18.0 through API 26.0. In API version 27.0 and later, UserProfileFeed is no longer available in the SOAP API. Use the Chatter REST API to access UserProfileFeed.
Supported Calls delete()
, describeSObjects()
, getDeleted()
, getUpdated()
, query()
, retrieve()
Special Access Rules
You can delete all feed items you created. To delete feed items you didn’t create, you must have one of these permissions:
• “Modify All Data”
• “Moderate Chatter”
66
Salesforce Knowledge SOAP API UserProfileFeed
Note: Users with the “Moderate Chatter” permission can delete only the feed items and comments they see.
• “Manage Unlisted Groups”
Only users with this permission can delete items in unlisted groups.
Fields
Field
Body
CommentCount
ContentData
ContentDescription
Details
Type textarea
Properties
Nillable, Sort
Description
The content of UserProfileFeed. Required when
Type
is
TextPost
. Optional when
Type is ContentPost or LinkPost . This field is the message that appears in the feed.
Type int
Properties
Filter, Group, Sort
Description
The number of FeedComments associated with this feed item.
Tip: In a feed that supports pre-moderation,
CommentCount
isn’t updated until a comment is published. For example, say you comment on a post that already has one published comment and your comment triggers moderation. Now there are two comments on the post, but the count says there's only one. In a moderated feed, your comment isn’t counted until it's approved by an admin or a person with
“CanApproveFeedPostAndComment” or “ModifyAllData” permission.
This has implications for how you retrieve feed comments. In a moderated feed, rather than retrieving comments by looping through CommentCount , go through pagination until end of comments is returned.
Type base64
Properties
Nillable
Description
Required if
Type
is
ContentPost
. Encoded file data in any format, and can’t be 0 bytes.
Setting this field automatically sets Type to ContentPost .
Type textarea
67
Salesforce Knowledge SOAP API
Field
ContentFileName
ContentSize
ContentType
CreatedDate
FeedPostId
UserProfileFeed
Details
Properties
Nillable, Sort
Description
The description of the file specified in
ContentData
.
Type string
Properties
Group, Nillable, Sort
Description
This field is required if Type is ContentPost . The name of the file uploaded to the feed.
Setting
ContentFileName
automatically sets
Type
to
ContentPost
.
Type int
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. The size of the file (in bytes) uploaded to the feed. This field is read-only and is automatically determined during insert.
Type string
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. The MIME type of the file uploaded to the feed.
This field is read-only and is automatically determined during insert.
Type dateTime
Properties
Defaulted on create, Filter, Sort
Description
Date and time when this record was created. This field is a standard system field.
Ordering by
CreatedDateDESC
sorts the feed by the most recent feed item.
Type reference
Properties
Filter, Group, Nillable, Sort
68
Salesforce Knowledge SOAP API
Field
InsertedById
IsDeleted
LastModifiedDate
LikeCount
UserProfileFeed
Details
Description
This field was removed in API version 22.0, and is available in earlier versions for backward compatibility only.
ID of the associated FeedPost. A FeedPost represents the following types of changes in an
FeedItem: changes to tracked fields, text posts, link posts, and content posts.
Type reference
Properties
Group, Nillable, Sort
Description
ID of the user who added this object to the feed. For example, if an application migrates posts and comments from another application into a feed, the InsertedBy value is set to the ID of the logged-in user.
Type boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Standard system field. Indicates whether the record has been moved to the Recycle Bin
( true ) or not ( false ).
Type dateTime
Properties
Defaulted on create, Filter, Sort
Description
Date and time when a user last modified this record. This field is a standard system field.
When a feed item is created,
LastModifiedDate
is the same as
CreatedDate
. If a FeedComment is inserted on that feed item, then
LastModifiedDate
becomes the
CreatedDate for that FeedComment. Deleting the FeedComment does not change the
LastModifiedDate
.
Ordering by LastModifiedDate DESC sorts the feed by both the most recent feed item or comment.
Type int
Properties
Filter, Group, Sort
Description
The number of FeedLikes associated with this feed item.
69
Salesforce Knowledge SOAP API
Field
LinkUrl
NetworkScope
ParentId
RelatedRecordId
UserProfileFeed
Details
Type url
Properties
Nillable, Sort
Description
The URL of a
LinkPost
.
Type picklist
Properties
Group, Nillable, Restricted picklist, Sort
Description
Specifies whether this feed item is available in the default community, a specific community, or all communities. This field is available in API version 26.0 and later, if Salesforce Communities is enabled for your organization.
NetworkScope can have the following values:
•
NetworkId
—The ID of the community in which the FeedItem is available. If left empty, the feed item is only available in the default community.
•
AllNetworks
—The feed item is available in all communities.
Note the following exceptions for NetworkScope :
• Only feed items with a Group or User parent can set a
NetworkId
or a null value for
NetworkScope .
• For feed items with a record parent, users can set
NetworkScope
only to
AllNetworks .
• You can’t filter a FeedItem on the
NetworkScope
field.
Type reference
Properties
Filter, Group, Sort
Description
ID of the account record that is tracked in the feed. The feed is displayed on the detail page for this record.
Type reference
Properties
Group, Nillable, Sort
Description
ID of the ContentVersion object associated with a ContentPost . This field is null for all posts except ContentPost .
70
Salesforce Knowledge SOAP API
Field
Title
Type
UserProfileFeed
Details
Type string
Properties
Group, Nillable, Sort
Description
The title of the user profile record. When the
Type
is
LinkPost
, the
LinkUrl
is the
URL and this field is the link name.
Type picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The type of feed item:
•
ActivityEvent
—indirectly generated event when a user or the API adds a Task associated with a feed-enabled parent record (excluding email tasks on cases). Also occurs when a user or the API adds or updates a Task or Event associated with a case record (excluding email and call logging).
For a recurring Task with CaseFeed disabled, one event is generated for the series only.
For a recurring Task with CaseFeed enabled, events are generated for the series and each occurrence.
•
AdvancedTextPost
—created when a user posts a group announcement and, in
Lightning Experience as of API version 39.0 and later, when a user shares a post.
• AnnouncementPost —Not used.
•
ApprovalPost
—generated when a user submits an approval.
• BasicTemplateFeedItem —Not used.
• CanvasPost —a post made by a canvas app posted on a feed.
•
CollaborationGroupCreated
—generated when a user creates a public group.
• CollaborationGroupUnarchived —Not used.
• ContentPost —a post with an attached file.
•
CreatedRecordEvent
—generated when a user creates a record from the publisher.
• DashboardComponentAlert —generated when a dashboard metric or gauge exceeds a user-defined threshold.
•
DashboardComponentSnapshot
—created when a user posts a dashboard snapshot on a feed.
•
LinkPost
—a post with an attached URL.
• PollPost —a poll posted on a feed.
• ProfileSkillPost —generated when a skill is added to a user’s Chatter profile.
•
QuestionPost
—generated when a user posts a question.
•
ReplyPost
—generated when Chatter Answers posts a reply.
71
Salesforce Knowledge SOAP API
Field
Visibility
UserProfileFeed
Details
•
RypplePost
—generated when a user creates a Thanks badge in Work.com.
• TextPost —a direct text entry on a feed.
•
TrackedChange
—a change or group of changes to a tracked field.
•
UserStatus
—automatically generated when a user adds a post. Deprecated.
The following values appear in the Type picklist for all feed objects but apply only to
CaseFeed:
• CaseCommentPost —generated event when a user adds a case comment for a case object
• EmailMessageEvent —generated event when an email related to a case object is sent or received
• CallLogPost —generated event when a user logs a call for a case through the user interface. CTI calls also generate this event.
•
ChangeStatusPost
—generated event when a user changes the status of a case
• AttachArticleEvent —generated event when a user attaches an article to a case
Note: If you set
Type
to
ContentPost
, also specify
ContentData
and
ContentFileName .
Type picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Specifies whether this feed item is available to all users or internal users only. This field is available in API version 26.0 and later, if Salesforce Communities is enabled for your organization.
Visibility
can have the following values:
• AllUsers —The feed item is available to all users who have permission to see the feed item.
• InternalUsers —The feed item is available to internal users only.
Note the following exceptions for
Visibility
:
• For record posts, Visibility is set to InternalUsers for all internal users by default.
• External users can set
Visibility
only to
AllUsers
.
• On user and group posts, only internal users can set Visibility to
InternalUsers
.
Usage
Use this object to query and retrieve record changes tracked in a user profile feed. Note the following when working with user profile feeds:
72
Letöltés
Hirdetés