Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by KaushikBhatt · Nov 26, 2018 at 04:36 PM · CloudScriptPlayer Data

Would it be possible to search all PlayFab users data using CloudScript?

HI,

This question is w.r.t Referrals. We would like our Referral code to be shorter than the PlayFabId (ideally 6 digit/alphanumeric) but the question is how?

We do not have like a central place to do the mapping of unique ID's to PlayFabID's so other option which is very crude and brute force is to go through all users and check for the unique code in their player data.

That's our least preferred option so does anyone have any better option?

Another option could be to run another service outside PlayFab to keep the mapping but that means we also need to keep that list updated as new players come into the game.

Any/All help is appreciated.

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Nov 27, 2018 at 07:38 AM

So first, no, it is not possible to iterate through all players as a result of a player action. That would mean each player could be trying to make upwards of millions of API calls, which clearly would not be supportable.

The real question is, what is it you want to do with the referral codes? Are you trying to create a system where you can reward a player for getting someone else to join the game? If so, I would recommend having a look at this sample, which is exactly that:

https://github.com/PlayFab/PlayFab-Samples/tree/master/Recipes/ReferralCodes

Otherwise, could you explain in more detail specifically what the feature is that you're trying to enable, so that we can advise you on the best approach?

Comment

People who like this

0 Show 4 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image KaushikBhatt · Nov 27, 2018 at 08:24 AM 0
Share

Hi.. Yes Agreed the option to go thru all players is really Bad.

Yes we have used the same recipe code. What we need now is to reduce the PlayFabId length for the user to punch in to claim the Reward for referral.

avatar image Brendan ♦♦ KaushikBhatt · Nov 27, 2018 at 08:35 AM 0
Share

Well, one possibility would be to use the Generic ID system. That was designed for developers to add a lookup for player accounts based upon any arbitrary ID (LinkedIn was the one requested when we added it). So you could add a Generic ID to each player using your code. That would allow you to use the lookup for Generic ID to find the PlayFab ID of the referring user.

avatar image KaushikBhatt Brendan ♦♦ · Nov 27, 2018 at 08:37 AM 0
Share

Awesome. I thot so when I saw GetPlayFabID from Facebook ID; but didn't spot any API that allowed to get PlayFabId from Generic/CustomID.. Can you point me to that API for Cloudscript?

Show more comments
avatar image

Answer by SethDu · Nov 27, 2018 at 05:30 AM

For the custom coupon, we suggest you to consider about converting your title into paid tier then open a ticket to consult devrel@playfab.com. We do not provide short digit coupon generating for Essential Tier. I will @Brendan to see if he can help you with it.

A feasible solution for your issue is firstly, using coupon codes that PlayFab generates to create a shorter one, then mapping them via a database.

For more details about coupon usages, please see the discussions here. If you want to generate a large quantity of coupons codes, you still need to open a ticket with us at devrel@playfab.com

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by KaushikBhatt · Nov 27, 2018 at 08:24 AM

Hi SethDu,

I'm not referring to Coupons here I want to know this in relation to Referral Code recipe shown here:

https://github.com/PlayFab/PlayFab-Samples/tree/master/Recipes/ReferralCodes

In this example you guys have used PlayFabID as the referral code which is of length 16; this is cumbersome for users to type when they are just starting to play the game; hence we would like to check if there is a way to shorten this ID.

Cheers!

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    Best practice for getting user data and account info on login 1 Answer

    How long after calling cloudscript to update statistic does it take to reflect in players account, and leaderboard? 1 Answer

    Edit/Update Player JSON Array/List on cloudscript? 1 Answer

    fuzzy search OR Partial DisplayName search 1 Answer

    Parse several events automatically 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges