For users in Communities, we want to change their User reputation points with code (Apex). How do I do this?
I did this during a migration from JiveX to Salesforce Community Cloud. You can use the Chatter API (ConnectApi) with Apex to achieve what you're doing. I assume you mean Apex when you say code?
You can use the Chatter API (ConnectApi) ConnectApi.Reputation class. It has two descriptive properties:
- reputationLevel (a reference to a ConnectApi.ReputationLevel), and
- reputationPoints (a Double that holds the actual number of points the user possesses)
as well as a String property that contains a URL to the reputation.
Additionally, there is a ReputationPointsRule class that contains information on the out-of-box activites that award points.