Skip to main content
Rewards usually involve other systems outside of player data, so this example demonstrates awarding virtual currency for the sake of simplicity.

Requirements

  • A PlayFab developer account.
  • A player must sign into both titles using the same credentials. One approach is to use Recoverable Credentials, as described in our Login Basics and Best Practices tutorial. To add a Recoverable login to an anonymous account, see our Account Linking tutorial.
  • This example requires a working knowledge of CloudScript:
    • Our example demonstrates basic data security to avoid player cheating. One could likewise use the server API on a custom game server, if the title makes use of them.
  • Rewards triggered through PlayFab require usage of the appropriate PlayFab features. PlayFab Rewards can be in the form of Virtual Currency, Inventory Items, Custom Player Data, Statistics, etc. Distributing rewards outside of PlayFab systems is an advanced topic, and is not covered in this tutorial.
We also recommended that developers use good error handling on all server API calls made from CloudScript.

Each game reports a login to publisher data

Each game needs to report that a login occurred. For simplicity, our example only provides one reward for each title, for each other publisher title played. Feel free to expand on the idea with counters, timestamps, or other mechanisms to provide progressive or sequential rewards. The following CloudScript would need to be present in every game in your studio.
In particular, this example demonstrates using:

Each game checks for redeemable rewards

After you are tracking which titles are played, you need to track and grant the rewards. This CloudScript function will check for and grant available rewards, based on having played other titles.
This particular example demonstrates the use of server.GetUserPublisherInternalData (requesting multiple keys), server.UpdateUserPublisherInternalData, and server.AddUserVirtualCurrency.
The code blocks represent these steps:

Conclusion

Player publisher data and player data are structurally identical. Player data should be title-specific, while player publisher data should only contain information relevant across all of your titles.

See also

Simple In-Game Cross Promotion: Reward players participating in more than one of your games.
Last modified on August 10, 2026