New and Changed Chatter in Apex Classes

These classes are new or have changes.

Chatter Feeds

These existing methods are in the ConnectApi.ChatterFeeds class.
Include a hyperlink in a post
Use this existing method with the updated ConnectApi.MarkupBeginSegmentInput and ConnectApi.MarkupEndSegmentInput classes.
  • postFeedElement(communityId, feedElement)
Include a hyperlink in a comment
Use this existing method with the updated ConnectApi.MarkupBeginSegmentInput and ConnectApi.MarkupEndSegmentInput classes.
  • postCommentToFeedElement(communityId, feedElementId, comment, feedElementFileUpload)
Move a post from one public group to another
Use this existing method, and set the subjectId property of the existing ConnectApi.FeedElementInput class to the new public group ID.
  • updateFeedElement(communityId, feedElementId, feedElement)

Missions

These new methods are in the ConnectApi.Missions class.
Export mission activity for a user
  • exportUserMissionsActivities(communityId, userId)
Start a job to purge mission activity for a user
  • purgeUserMissionsActivities(communityId, userId)
Update the mission activity counts for a user
  • updateUserMissionActivityCount(activityType, activityCount, communityId, userId)

Next Best Actions (Generally Available)

All the Next Best Action methods, even methods introduced in versions 43.0 and 44.0, now have a minimum version of 45.0. All properties of the related input and output classes also have a minimum version of 45.0.
These new methods are in the ConnectApi.NextBestAction class.
Get a recommendation
  • getRecommendation(recommendationId)
    Note

    Note

    This method replaces the getProposition(propositionId) method.

Execute a recommendation strategy, and request trace information
  • executeStrategy(strategyName, maxResults, contextRecordId, debugTrace)
Get recommendation reactions
  • getRecommendationReactions(onBehalfOfId, createdById, targetId, contextRecordId, pageParam, pageSize)
Users with the Manage Next Best Action Recommendations or Modify All Data permission can get recommendation reactions.
Get a recommendation reaction
  • getRecommendationReaction(reactionId)
Users with the Manage Next Best Action Recommendations or Modify All Data permission can get recommendation reactions.
Delete a recommendation reaction
  • deleteRecommendationReaction(reactionId)
Users with the Manage Next Best Action Recommendations or Modify All Data permission can delete recommendation reactions.

Social Engagement

These new methods are in the ConnectApi.SocialEngagement class.
Get available intents for a social post
  • getIntents(socialPostId)
Follow a social persona
  • followSocialPersona(socialPersonaId, socialAccountId)

    socialPersonaId is the ID of the persona to follow, and socialAccountId is the ID of the account that follows the persona.

  • followSocialPostPersona(socialPostId, socialAccountId)

    socialPostId is the ID of the post authored by the persona to follow, and socialAccountId is the ID of the account that follows the persona.

Stop following a social persona
  • unfollowSocialPersona(socialPersonaId, socialAccountId)

    socialPersonaId is the ID of the persona to stop following, and socialAccountId is the ID of the account that stops following the persona.

  • unfollowSocialPostPersona(socialPostId, socialAccountId)

    socialPostId is the ID of the post authored by the persona to stop following, and socialAccountId is the ID of the account that stops following the persona.

Users

These new methods are in the ConnectApi.ChatterUsers class.
Get more detailed information about a user’s groups
  • getUserGroups(communityId, userId)
  • getUserGroups(communityId, userId, pageParam, pageSize)
Note

Note

These methods replace the getGroups(communityId, userId) and getGroups(communityId, userId, pageParam, pageSize) methods.

Search a user’s groups and get more detailed information
  • searchUserGroupDetails(communityId, userId, q)
  • searchUserGroupDetails(communityId, userId, q, pageParam, pageSize)
Note

Note

These methods replace the searchUserGroups(communityId, userId, q) and searchUserGroups(communityId, userId, q, pageParam, pageSize) methods.