Forum Discussion

Natkinson's avatar
Natkinson
Genius
3 years ago

Set User Rank via API

We recently updated our ranking system and use some custom ranking formulas for our new ranks. However, we have some longtime users who didn't meet all of our new criteria so they were "demoted" to a...
  • AdamN's avatar
    AdamN
    3 years ago

    I think Stan has the right idea. As Stan pointed out, you can't directly set ranks via the API or otherwise; it's all managed through the rank structure itself, so the rank structure would need to be built to account for this.

    How easy or hard this is will likely depend on how your rank formulas are constructed:

    • If your formula is essentially a series of AND evaluations (e.g. posts > 10 && net_kudos_events_received > 5 && tagging_tag_count > 3 && ...) then you'll probably need some kind of special case added in as an OR logic, or as Stan suggested have separate parallel ranks for the legacy users based on role or some other criteria unique to these users.
    • If your formula is doing some kind of math calculation to total some kind of "points" system (e.g. posts*1.4 + net_kudos_events_received*3 +tagging_tag_count*0.7 > 24), then one option would be to use the Bonus Points ("arbitrary_points" in your rank formula) to give these legacy users a boost to meet some minimum ranking threshold.