New and Changed Chatter in Apex Classes

Chatter Feeds

These methods are in the ConnectApi.ChatterFeeds class.
Get information about who read a feed element and when
  • getReadByForFeedElement(communityId, feedElementId)
  • getReadByForFeedElement(communityId, feedElementId, pageParam, pageSize)
Mark a feed element as read for the context user
  • setIsReadByMe(communityId, feedElementId, readBy), where readBy is the new ConnectApi.ReadByCapabilityInput
  • setIsReadByMe(communityId, feedElementId, isReadByMe)
Mark multiple feed elements as read for the context user at the same time
  • updateFeedElementReadByCapabilityBatch(communityId, feedElementIds, readBy), where readBy is the new ConnectApi.ReadByCapabilityInput
  • updateFeedElementReadByCapabilityBatch(communityId, feedElementIds, isReadByMe)
Get the read or unread feed elements for the context user from a group feed
  • getFeedElementsFromFeed(communityId, feedType, subjectId, recentCommentCount, elementsPerBundle, density, pageParam, pageSize, sortParam, showInternalOnly, filter), where feedType is Record, subjectId is a group ID, and filter is set to Read or Unread
Update the members of a direct message
  • updateDirectMessage(communityId, feedElementId, directMessage)
Get the direct message moderation feed
  • getFeed(communityId, feedType)
  • getFeed(communityId, feedType, sortParam)
In these methods, feedType is DirectMessageModeration.
Get the feed elements from the direct message moderation feed
  • getFeedElementsFromFeed(communityId, feedType)
  • getFeedElementsFromFeed(communityId, feedType, pageParam, pageSize, sortParam)
  • getFeedElementsFromFeed(communityId, feedType, recentCommentCount, density, pageParam, pageSize, sortParam)
  • getFeedElementsUpdatedSince(communityId, feedType, recentCommentCount, density, pageParam, pageSize, updatedSince)
In these methods, feedType is DirectMessageModeration.

All these methods have matching set test methods.

Search the feed elements in the direct message moderation feed
  • searchFeedElementsInFeed(communityId, feedType, q)
  • searchFeedElementsInFeed(communityId, feedType, pageParam, pageSize, sortParam, q)
  • searchFeedElementsInFeed(communityId, feedType, recentCommentCount, density, pageParam, pageSize, sortParam, q)
In these methods, feedType is DirectMessageModeration.

All these methods have matching set test methods.

Get the feed elements authored by the user profile owner from the user profile feed
  • getFeedElementsFromFeed(communityId, feedType, subjectId, recentCommentCount, density, pageParam, pageSize, sortParam, filter), where filter is set to AuthoredBy
Get sorted feed streams
  • getStreams(communityId, sortParam)
  • getStreams(communityId, pageParam, pageSize, sortParam)
Search feed streams
  • searchStreams(communityId, q)
  • searchStreams(communityId, q, sortParam)
  • searchStreams(communityId, q, pageParam, pageSize)
  • searchStreams(communityId, q, pageParam, pageSize, sortParam)

All these methods have matching set test methods.

Get the custom filtered feed elements from the case feed
  • getFeedElementsFromFeed(communityId, feedType, subjectId, recentCommentCount, density, pageParam, pageSize, sortParam, customFilter)
  • getFeedElementsFromFeed(communityId, feedType, subjectId, recentCommentCount, elementsPerBundle, density, pageParam, pageSize, sortParam, showInternalOnly, customFilter)
  • getFeedElementsUpdatedSince(communityId, feedType, subjectId, recentCommentCount, elementsPerBundle, density, pageParam, pageSize, updatedSince, customFilter)
  • getFeedElementsUpdatedSince(communityId, feedType, subjectId, recentCommentCount, elementsPerBundle, density, pageParam, pageSize, updatedSince, showInternalOnly, customFilter)

All these methods have matching set test methods.

Search the custom filtered feed elements in the case feed
  • searchFeedElementsInFeed(communityId, feedType, subjectId, recentCommentCount, density, pageParam, pageSize, sortParam, q, customFilter)
  • searchFeedElementsInFeed(communityId, feedType, subjectId, recentCommentCount, density, pageParam, pageSize, sortParam, q, showInternalOnly, customFilter)

All these methods have matching set test methods.

Get information about several feeds and a page of feed elements
  • getFeedWithFeedElements(communityId, feedType, pageSize)
  • getFeedWithFeedElements(communityId, feedType, pageSize, recentCommentCount)
In these methods, valid values for feedType are Company, DirectMessageModeration, DirectMessages, Home, Landing, Moderation, and PendingReview. Landing is valid only when communityId is internal.
Create a feed element that has an extension (pilot)
Note

Note

We provide Extensions to selected customers through a pilot program that requires agreement to specific terms and conditions. Extensions is subject to change and isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

  • postFeedElement(communityId, feedElement)

    Use this existing method with the new ConnectApi.ExtensionsCapabilityInput class.

Get extensions (pilot)
  • getExtensions(communityId, pageParam, pageSize)

Community Moderation

These methods are in the ConnectApi.CommunityModeration class.
Get more details about flagged posts and comments
  • getFlagsOnFeedElement(communityId, feedElementId, pageParam, pageSize)
  • getFlagsOnFeedElement(communityId, feedElementId, visibility, pageSize, pageParam)
  • getFlagsOnComment(communityId, commentId, pageSize, pageParam)
  • getFlagsOnComment(communityId, commentId, visibility, pageSize, pageParam)

Files Connect

These methods are in the ConnectApi.ContentHub class.
Test your Files Connect methods
  • setTestAddRepositoryItem(repositoryId, repositoryFolderId, file, result)
  • setTestAddRepositoryItem(communityId, repositoryId, repositoryFolderId, file, result)
  • setTestAddRepositoryItem(repositoryId, repositoryFolderId, file, fileData, result)
  • setTestAddRepositoryItem(communityId, repositoryId, repositoryFolderId, file, fileData, result)
  • setTestGetAllowedItemTypes(repositoryId, repositoryFolderId, result)
  • setTestGetAllowedItemTypes(repositoryId, repositoryFolderId, filter, result)
  • setTestGetAllowedItemTypes(communityId, repositoryId, repositoryFolderId, result)
  • setTestGetAllowedItemTypes(communityId, repositoryId, repositoryFolderId, filter, result)
  • setTestGetFilePreview(repositoryId, repositoryFileId, formatType, result)
  • setTestGetFilePreview(repositoryId, repositoryFileId, formatType, startPageNumber, endPageNumber, result)
  • setTestGetFilePreview(communityId, repositoryId, repositoryFileId, formatType, result)
  • setTestGetFilePreview(communityId, repositoryId, repositoryFileId, formatType, startPageNumber, endPageNumber, result)
  • setTestGetItemType(repositoryId, repositoryItemTypeId, result)
  • setTestGetItemType(communityId, repositoryId, repositoryItemTypeId, result)
  • setTestGetPreviews(repositoryId, repositoryFileId, result)
  • setTestGetPreviews(communityId, repositoryId, repositoryFileId, result)
  • setTestGetRepositories(result)
  • setTestGetRepositories(communityId, result)
  • setTestGetRepositories(pageParam, pageSize, result)
  • setTestGetRepositories(communityId, pageParam, pageSize, result)
  • setTestGetRepository(repositoryId, result)
  • setTestGetRepository(communityId, repositoryId, result)
  • setTestGetRepositoryFile(repositoryId, repositoryFileId, result)
  • setTestGetRepositoryFile(repositoryId, repositoryFileId, includeExternalFilePermissionsInfo, result)
  • setTestGetRepositoryFile(communityId, repositoryId, repositoryFileId, result)
  • getRepositoryFile(communityId, repositoryId, repositoryFileId, includeExternalFilePermissionsInfo)
  • setTestGetRepositoryFolder(repositoryId, repositoryFolderId, result)
  • setTestGetRepositoryFolder(communityId, repositoryId, repositoryFolderId, result)
  • setTestGetRepositoryFolderItems(repositoryId, repositoryFolderId, result)
  • setTestGetRepositoryFolderItems(communityId, repositoryId, repositoryFolderId, result)
  • setTestGetRepositoryFolderItems(repositoryId, repositoryFolderId, pageParam, pageSize, result)
  • setTestGetRepositoryFolderItems(communityId, repositoryId, repositoryFolderId, pageParam, pageSize, result)
  • setTestUpdateRepositoryFile(repositoryId, repositoryFileId, file, result)
  • setTestUpdateRepositoryFile(repositoryId, repositoryFileId, file, fileData, result)
  • setTestUpdateRepositoryFile(communityId, repositoryId, repositoryFileId, file, result)
  • setTestUpdateRepositoryFile(communityId, repositoryId, repositoryFileId, file, fileData, result)

Topics

This method is in the ConnectApi.Topics class.
Assign topics to or unassign topics from articles in a data category
  • updateTopicsForArticlesInDataCategory(communityId, dataCategoryGroup, dataCategory, articleTopicAssignmentJob)
Create, get, and reassign topic and article assignment rules
  • createTopicDataCategoryRules(communityId, dataCategoryGroup, dataCategory, topicNames)
  • getTopicDataCategoryRules(communityId, dataCategoryGroup, dataCategory)
  • reassignTopicDataCategoryRules(communityId, dataCategoryGroup, dataCategory, topicNames)

executeQuery

This method is in the ConnectApi.Wave class.
Send a query string to Wave Analytics and get the results as JSON.
  • public ConnectApi.LiteralJson ConnectApi.Wave.executeQuery(String query)