Newer Version Available

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

Missions Class

Export and purge mission activity for users. Update mission activity counts for users.

Namespace

ConnectApi

Missions Methods

The following are methods for Missions. All methods are static.

exportUserMissionsActivities(communityId, userId)

Export mission activity for a user.

API Version

45.0

Requires Chatter

No

Signature

public static ConnectApi.UserMissionActivitiesJob exportUserMissionsActivities(String communityId, String userId)

Parameters

communityId
Type: String
Use either the ID for a community, internal, or null.
userId
Type: String
ID of the user.

Usage

You can export these activities with this method.
  • FeedItemAnswerAQuestion—User answered a question.
  • FeedItemLikeSomething—User liked a post or comment.
  • FeedItemMarkAnswerAsBest—User marked an answer as the best answer.
  • FeedItemPostQuestion—User posted a question.
  • FeedItemReceiveAComment—User received a comment on a post.
  • FeedItemReceiveALike—User received a like on a post or comment.
  • FeedItemReceiveAnAnswer—User received an answer to a question.
  • FeedItemWriteAComment—User commented on a post.
  • FeedItemWriteAPost—User made a post.
  • FeedItemYourAnswerMarkedBest—​User’s answer was marked as the best answer.

purgeUserMissionsActivities(communityId, userId)

Start a job to purge mission activity for a user.

API Version

45.0

Requires Chatter

No

Signature

public static ConnectApi.UserMissionActivitiesJob purgeUserMissionsActivities(String communityId, String userId)

Parameters

communityId
Type: String
Use either the ID for a community, internal, or null.
userId
Type: String
ID of the user.

Usage

You can purge these activities with this method.
  • FeedItemAnswerAQuestion—User answered a question.
  • FeedItemLikeSomething—User liked a post or comment.
  • FeedItemMarkAnswerAsBest—User marked an answer as the best answer.
  • FeedItemPostQuestion—User posted a question.
  • FeedItemReceiveAComment—User received a comment on a post.
  • FeedItemReceiveALike—User received a like on a post or comment.
  • FeedItemReceiveAnAnswer—User received an answer to a question.
  • FeedItemWriteAComment—User commented on a post.
  • FeedItemWriteAPost—User made a post.
  • FeedItemYourAnswerMarkedBest—​User’s answer was marked as the best answer.

updateUserMissionActivityCount(activityType, activityCount, communityId, userId)

Update the mission activity count for a user.

API Version

45.0

Requires Chatter

No

Signature

public static ConnectApi.UserMissionActivityStatus updateUserMissionActivityCount(ConnectApi.UserMissionActivityType activityType, Integer activityCount, String communityId, String userId)

Parameters

activityType
Type: ConnectApi.UserMissionActivityType
Type of mission activity for a user. Values are:
  • FeedItemAnswerAQuestion—User answered a question.
  • FeedItemLikeSomething—User liked a post or comment.
  • FeedItemMarkAnswerAsBest—User marked an answer as the best answer.
  • FeedItemPostQuestion—User posted a question.
  • FeedItemReceiveAComment—User received a comment on a post.
  • FeedItemReceiveALike—User received a like on a post or comment.
  • FeedItemReceiveAnAnswer—User received an answer to a question.
  • FeedItemWriteAComment—User commented on a post.
  • FeedItemWriteAPost—User made a post.
  • FeedItemYourAnswerMarkedBest—​User’s answer was marked as the best answer.
activityCount
Type: Integer
Number of mission activities of the specified type for the user.
communityId
Type: String
Use either the ID for a community, internal, or null.
userId
Type: String
ID of the user.