Latest news and updates from the PlayFab developers

by JamesGwertzman 2016-05-12

Introducing PlayStream

We’re thrilled to be able to unveil PlayStream, our latest addition to the PlayFab platform, and one that makes sophisticated, high-end automation of live game operations available to all game developers.

PlayStream offers the following features to developers:

  • An event pipeline which unifies the entire data flow from your game into a single data stream. The PlayFab Game Services will automatically insert events into PlayStream, and you can add custom events from your using our new WriteEvent API client and server methods. Our Marketplace Add-ons will also generate events automatically. Events are managed as JSON data.
  • A real-time rules engine, which can evaluate complex rules in response to incoming events through PlayStream, and trigger a variety of actions, including CloudScript.
  • A real-time segmentation system, which can group players into segments based on a variety of player properties. Segments are calculated in real-time and always up-to-date. Actions may be triggered automatically as players enter or exit segments.
  • Real-time visualization of event data, including a real-time event debugger, and KPI graphs for key events such as installs, logins, errors, and revenue.
  • The ability to send some or all of the events to external web services via webhooks. These can be configured automatically by installing Marketplace Add-ons, or configured manually to send events to your own servers.
  • An event archive where you can filter, search, and view historical events, including event delivery history.
  • The ability to automatically archive your events into an Amazon S3 bucket. Once in S3, you can run your own analysis against your events, including copying them directly into Amazon RedShift.

Let’s look at these features in more detail.

PlayStream Event Pipeline and Debugger

The easiest way to see the event pipeline in action is through the PlayStream Debugger. You’ll notice the debugger as soon as you visit the Dashboard, or click on the PlayStream tab for your game.


The PlayStream debugger is a real-time stream of all the events for your game, including any custom events you choose to send, using our new WriteEvent API method. This is immensely valuable during development, as it gives you a way to immediately see what’s happening on the backend as you test out your client- and server-side code, linking you straight to the player accounts so that you can check them against the game logic you’re working on.

There are several clickable fields in each event. If you click the “(i)” information circle, you will see the raw event JSON data.


You can also click the player’s ID to jump straight to the player’s profile, and certain other events have other clickable fields, like a link to the item description for the player_inventory_item_added event.

KPI Graphs

We also provide essential real-time KPI graphs that are updated every 30 seconds. These graphs display KPI’s like Installs, Logins, and Revenue in your new dashboard, with more KPIs to come soon.


But the real power of the system comes from what you can then do with those events.

User Segmentation and Segment Actions

Using those events, you can set up segments which define players within your user base based upon most player properties. This all happens in real time -- there should be no perceptual lag, even at large scale. If you can tie an event to the thing you want to use as a differentiating factor, you can make a segment for it. And segments will apply retroactively to all players, based on the data in their profiles -- so if you define a segment of players where XP > 10,000, then every player with XP > 10,000 will now be in that segment.


This particular segment will be evaluated anytime the statistic called “forum_posts” changes. In this case, that statistic is updated whenever the player posts to a forum hosted by our Add-on partner Innervate.

If the condition evaluates to true, then the player will enter the “Forum Poster” segment, and the corresponding action(s) will be triggered -- in this case, it will send a push notification, and call the following CloudScript function which grants gems equal to the number of forum posts…


You can see this happening in the debug log -- as the statistic changes, it puts the player in the segment, which triggers the action to call CloudScript, which grants the gem.


You can also trigger a different custom action when the player leaves a segment, allowing you to make any other changes needed as a result.

You can also trigger several other basic actions, including granting an item to the player, granting virtual currency, changing a statistic, banning a player, or sending a Push notification. That way, you don’t even need to write a line of Cloud Script to manage those common cases. Other basic actions will be added over time.



You can also set up webhooks, such that some or all of the events going through PlayStream will get pushed out to an external service. For example, you could use this feature to call your own backend server on any statistic change, as follows:


PlayStream webhooks are POST calls to your provided endpoint, which pass along all the data for the event in the body of the call. Using this mechanism, you could then enable additional custom actions on your real-time data, using your own custom services.

Event History

You can also access a historical archive of events. By default, events are kept for a certain period of time that depends on your service tier. You can view the event history in two places -- you can view all events for your title in the PlayStream “Event History” tab, or only events for a particular player on that player’s “PlayStream” tab.

You can click on a particular event to see details for that particular event, including its delivery history. This particular event below, for example, has been delivered to three different Marketplace Add-ons --- Appuri (both legacy and current), and

Raw Access to Your Event Data

We also provide the option to store all your events in an Amazon S3 storage bucket that you own, so that you can access a raw dump of all your event data. You can set this up via the PlayFab Game Manager in the PlayStream tab, under the Event Archive option.

One you have your bucket fully configured, events for your title will immediately begin streaming into the bucket.

Each file in the bucket will store all events over a roughly 5 minute period. You can then use this raw dump to do a deep-dive analysis on player behavior, feed it into other tools, or even import it into Redshift.


We have provided several sources of documentation to get you started with PlayStream.

If you have questions, please post on our forums and we’ll do our best to respond quickly.


Unlike the core PlayFab Game Services, PlayStream will not be free. You will need to sign up for a monthly subscription in order to use most of the PlayStream features. The only PlayStream feature which will be free is the real-time event debugger.

Initial pricing is published on our pricing page, however for the initial launch period, we are waiving all costs. We will not start charging for PlayStream until May, 2016. If you have questions about the pricing, please contact us.