Hi,
I have in my title some players without Display Name.
Is it possible include it into a segment and after that delete it with a scheduled task?
thanks for the help.
Hi,
I have in my title some players without Display Name.
Is it possible include it into a segment and after that delete it with a scheduled task?
thanks for the help.
It is possible, but will need a workaround. You may first create a scheduled task for all players and check the display name of each of them via API GetPlayerProfile, then call delete related API.
However, please be very careful when running tasks on All Players, I will suggest getting the number of players who don't have Display Name first, before you decide a batch deletion. To do this, you may call AddPlayerTag to add a specific tag instead of direct deletion. After the scheduled task is finished. Create another Segment where Tag name in the configuration equals to what you have defined in the Cloud Script/Azure function. Then you may create a scheduled task to delete all players in this segment.
Please note that if you are in a paid tier, there are no limits on the quantity of players in a title. Meanwhile, deleting is a process of profile writing, which will cost like normal profile modifying. It will cost a lot if the number is huge. (it will be fine if the title is still in development mode) Normally we won’t recommend batch deleting players. If you have concerns of inactive players, we suggest using last login(date) in the segment.
Hi, thanks for the answer. I understood the high level of your workaround...but I've some difficoulties about the steps to follow. How I can invoke GetPlayerProfile? via cloud script? do you have an example for me?
Here is a sample on checking the existence of display name. For other properties, please remember to define Profile constraints in the request -- PlayerProfileViewConstraints
handlers.test1 = function (args, context) { var request = { "PlayFabId" : currentPlayerId }; var result = server.GetPlayerProfile(request); return result.PlayerProfile.hasOwnProperty('DisplayName'); }
3 People are following this question.