Newer Version Available
Missions Class
Export and purge mission activity for users. Get a user’s mission progress. Update
mission activity counts for users.
Namespace
Missions Methods
The following are methods for Missions. All
methods are static.
exportUserMissionsActivities(communityId, userId)
API Version
45.0
Requires Chatter
No
Signature
public static ConnectApi.UserMissionActivitiesJob exportUserMissionsActivities(String communityId, String userId)
Parameters
Return Value
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.
getUserMissionsProgress(communityId, userId)
API Version
46.0
Requires Chatter
No
Signature
public static ConnectApi.UserMissionActivityCollection getUserMissionsProgress(String communityId, String userId)
Parameters
Return Value
purgeUserMissionsActivities(communityId, userId)
API Version
45.0
Requires Chatter
No
Signature
public static ConnectApi.UserMissionActivitiesJob purgeUserMissionsActivities(String communityId, String userId)
Parameters
Return Value
Usage
This method purges these activities.
- 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)
API Version
49.0
Requires Chatter
No
Signature
public static ConnectApi.UserMissionActivitiesJob purgeUserMissionsActivities(String communityId)
Parameters
- communityId
- Type: String
- Use the ID for an Experience Cloud site, internal, or null.
Return Value
Usage
This method purges these activities.
- 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)
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 the ID for an Experience Cloud site, internal, or null.
- userId
- Type: String
- ID of the user.