How to get the position (rank) of the leaderboard when you reset the leaderboard. And send a notification with rank?
Greetings,
Could you provide more details on how you're attempting to implement? When Leaderboards are reset they contain no rankings, so this notification to the player would not contain any information.
Answer by SethDu · Apr 24, 2019 at 07:32 AM
I am not sure how will you reset your leaderboard but if you want to retrieve the last version of leaderboard, you may make use of the UseSpecificVersion and Version properties in the leaderboard retrieval related API call requests, like GetLeaderboard, GetLeaderboardAroundPlayer and etc.
For Essential Tier users, you may notice that only the last version of leaderboard is available to retrieve. You can implement cloud script functions that will call GetLeaderboardAroundPlayer to get the rank and then send it via SendPushNotification API calls. In addition, you can configure a Scheduled Task to run this functions to each member in All Players segment.
By the way, there is a programmatical way to reset the leaderboard but it is only included in Admin API which means, you cannot reset leaderboard in Cloud Script, instead you may implement it in your external secure server. However, like what @jital has mentioned, if you tell us more about your scenario, we can offer more help.