New and Changed Chatter in Apex Classes

These classes are new or have changes.

Chatter Feeds

These new and existing methods are in the ConnectApi.ChatterFeeds class.
Create a draft post
Use this existing method with the updated ConnectApi.StatusCapabilityInput class.
  • postFeedElement(communityId, feedElement)
Get the context user’s draft feed
Use these existing methods with the feedType set to Draft and the subjectId set to the context user’s ID.
  • getFeed(communityId, feedType, subjectId)
  • getFeed(communityId, feedType, subjectId, sortParam)
Get the feed elements from the context user’s draft feed
Use these existing methods with the feedType set to Draft and the subjectId set to the context user’s ID.
  • getFeedElementsFromFeed(communityId, feedType, subjectId)
  • getFeedElementsFromFeed(communityId, feedType, subjectId, pageParam, pageSize, sortParam)
  • getFeedElementsFromFeed(communityId, feedType, subjectId, recentCommentCount, density, pageParam, pageSize, sortParam)
These methods have matching set test methods.
Search the feed elements from the draft feed
Use these existing methods with the feedType set to Draft and the subjectId set to the context user’s ID.
  • searchFeedElementsInFeed(communityId, feedType, subjectId, q)
  • searchFeedElementsInFeed(communityId, feedType, subjectId, pageParam, pageSize, sortParam, q)
  • searchFeedElementsInFeed(communityId, feedType, subjectId, recentCommentCount, density, pageParam, pageSize, sortParam, q)
These methods have matching set test methods.
Publish a draft post
This method is new.
  • publishDraftFeedElement(communityId, feedElementId, feedElement)
Access the comments capability for a comment
This method is new.
  • getThreadsForFeedComment(communityId, commentId, threadedCommentsCollapsed)
Get threaded comments for a comment
These methods are new.
  • getThreadsForFeedComment(communityId, commentId)
  • getThreadsForFeedComment(communityId, commentId, pageParam, pageSize)
Get a threaded comment in context of its parent comments and parent post
This method is new.
  • getCommentInContext(communityId, commentId, pageSize)
Get comments in a threaded style for a feed element
These methods are new.
  • getCommentsForFeedElement(communityId, feedElementId, threadedCommentsCollapsed)
  • getCommentsForFeedElement(communityId, feedElementId, pageParam, pageSize, threadedCommentsCollapsed)
  • getCommentsForFeedElement(communityId, feedElementId, sortParam, threadedCommentsCollapsed)
  • getCommentsForFeedElement(communityId, feedElementId, threadedCommentsCollapsed, sortParam)
  • getCommentsForFeedElement(communityId, feedElementId, pageParam, pageSize, threadedCommentsCollapsed, sortParam)
  • getFeedElementsFromFeed(communityId, feedType, recentCommentCount, density, pageParam, pageSize, sortParam, filter, threadedCommentsCollapsed)
  • getFeedElementsFromFeed(communityId, feedType, subjectId, recentCommentCount, density, pageParam, pageSize, sortParam, filter, threadedCommentsCollapsed)
  • getFeedElementsFromFeed(communityId, feedType, subjectId, recentCommentCount, elementsPerBundle, density, pageParam, pageSize, sortParam, showInternalOnly, customFilter, threadedCommentsCollapsed)
Get a feed element with comments in a threaded style
These methods are new.
  • getFeedElement(communityId, feedElementId, threadedCommentsCollapsed)
  • getFeedElement(communityId, feedElementId, threadedCommentsCollapsed, commentSort)
  • getFeedElement(communityId, feedElementId, recentCommentCount, elementsPerBundle, threadedCommentsCollapsed)
  • getFeedElement(communityId, feedElementId, recentCommentCount, elementsPerBundle, threadedCommentsCollapsed, commentSort)
Get feed elements with comments in a threaded style for a record feed
This method is new.
  • getFeedElementsFromFeed(communityId, feedType, subjectId, recentCommentCount, elementsPerBundle, density, pageParam, pageSize, sortParam, showInternalOnly, filter, threadedCommentsCollapsed)
This method has a matching set test method.
Search feed elements with comments in a threaded style
These methods are new.
  • searchFeedElements(communityId, q, threadedCommentsCollapsed)
  • searchFeedElements(communityId, q, pageParam, pageSize, threadedCommentsCollapsed)
These methods have matching set test methods.
Create a threaded comment
Use this existing method with the updated ConnectApi.CommentInput class.
  • postCommentToFeedElement(communityId, feedElementId, comment, feedElementFileUpload)

Managed Social Accounts

These new methods are in the ConnectApi.SocialEngagement class.
Get managed social accounts
  • getManagedSocialAccount(id)
  • getManagedSocialAccounts()
  • getManagedSocialAccounts(socialNetwork)

Managed Topics

These new and existing methods are in the ConnectApi.ManagedTopics class.
Create content managed topics
Use these existing methods with the managedTopicType set to Content.
  • createManagedTopic(communityId, recordId, managedTopicType)
  • createManagedTopicByName(communityId, name, managedTopicType)
Get content managed topics
Use these existing methods with the managedTopicType set to Content.
  • getManagedTopic(communityId, managedTopicId)
  • getManagedTopics(communityId)
  • getManagedTopics(communityId, managedTopicType)
Use this new method with the managedTopicType set to Content.
  • getManagedTopics(communityId, managedTopicType, pageParam, pageSize)
Delete content managed topics
Use this existing method with the ID of a content topic.
  • deleteManagedTopic(communityId, managedTopicId)

Next Best Actions (Pilot)

Note

Note

We provide Einstein Next Best Action to selected customers through a pilot program that requires agreement to specific terms and conditions. To be nominated to participate in the program, contact Salesforce. Pilot programs are subject to change, and we can’t guarantee acceptance. Einstein Next Best Action 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. You can provide feedback and suggestions for Einstein Next Best Action in the IdeaExchange.

All the Next Best Action methods, even methods introduced in version 43.0, now have a minimum version of 44.0. All the properties of the related input and output classes also have a minimum version of 44.0.

These new methods are in the ConnectApi.NextBestAction class.
Execute a strategy
  • executeStrategy(strategyName, maxResults, contextRecordId)
  • executeStrategy(strategyName, strategyInput)
We no longer support the getRecommendations(strategyName, maxResults, contextRecordId) method.