We are looking to grant items to accounts whose email matches an online database of users who have subscribed to a website. Is there an easy way we can check against a list of emails and if they already have the item?
We are looking to grant items to accounts whose email matches an online database of users who have subscribed to a website. Is there an easy way we can check against a list of emails and if they already have the item?
>> check against a list of emails
I am not sure which email you are asking, but to get the player’s PlayFab Login Email or Contact Email, you may use GetPlayerProfile API, with additional ProfileConstraints property, defined in the request, for example:
{ "PlayFabId": "xxxxxxx", "ProfileConstraints":{ "ShowLinkedAccounts":true, "ShowContactEmailAddresses": true } }
Meanwhile, PlayFab supports to create a scheduled task to check emails for all players, via selecting “Run actions on each Player in a segment” and select “ALL Players” segment. You may create a Cloud Script function or Azure function to call GetPlayerProfile API to retrieve player’s email address.
In addition, in terms of external database, I am not sure how you will to retrieve those data, but Cloud Script doesn’t support importing 3rd party module but it should work via HTTP request.
>> if they already have the item?
You may simply store a flag variable in Player Read-Only/Internal Data as a mark.
3 People are following this question.