Blog

Latest news and updates from the PlayFab developers

by JamesGwertzman 2016-05-06

Introducing Targeted Stores

When we released PlayStream, we introduced the idea of Segments. Today we are announcing one of the first new features to use Segments -- targeted stores. With this feature, you can change the contents of an in-game store based on the player’s segmentation.

Because player segments are versatile, this feature is versatile. You can target store contents based on a player’s in-game behavior, their device, their currency balances, how long it’s been since they last logged in --- even the current date.

And best of all, this feature is controlled entirely from within the Game Manager. You can start using this feature today, for a game that’s already in the market, with no updates to the game needed (assuming the game is already using PlayFab stores).

To use this feature, you define store “overrides” based on player segment. When your game requests a store, using the GetStoreItems API, the system will first check to see if the player matches any player segments with defined store overrides. If so, then that store override will be returned instead.

You can define a store override by visiting the store page in the Game Manager. At the bottom of that page, you will see a list of all current player segments defined by PlayStream. For each segment, you can optionally choose a different store to be returned if the player matches that segment.

Targeted stores work best if the game downloads the store each time it is needed. We recommend caching the item catalog, but loading the store dynamically. Otherwise if the user enters a new segment, they may not see store changes that they should otherwise be shown.

To further illustrate this new feature, imagine the following scenario:

  • You have a free-to-play game that sells a hard-currency (“gems”) for cash
  • You want to offer different gem packs to players based on their spending history, as follows:
    • Non-spenders: offer $0.99, $2.99, $4.99, and $9.99 packs.
    • Minnows (spent < $100): offer $99, $2.99, $9.99, and $49.99 packs.
    • Whales (spent > $100): offer $2.99, $9.99, $49.99, and $99.99 packs.

To do this using targeted stores, you would:

  • Create the 6 gem packs in the PlayFab catalog
  • Download and display a default “gem store” in the game
  • Set up segments in PlayStream to target minnows and whales
  • Create special stores for the minnows and whales
  • Override the default store with one of the special stores based on the player segment

That’s it! When the game retrieves the default store, if the player is a member of one of the targeted segments, the player will automatically be sent a different store instead.

So now let’s go through the specifics:

Prerequisite: Setup the Appropriate Items in Your Catalog

The first step is to set up the appropriate items in your catalog. This is one of the most basic aspects of using PlayFab, and documented within our documentation section.

In this case, we will set up 6 gem pack bundles at 6 different price points.

Prerequisite: Setting Up Your Game to Use Stores

The next step in using this feature is to set up your game to use stores. If you’re already using stores, great, you can skip this step.

A “store” is a subset of your item catalog, potentially with different prices. You can read more about stores in this earlier blog post. You can also read more about using a store to do real-money purchasing from a previous blog post on the subject.
Once you have a store set up, your game will request the store from PlayFab using the GetStoreItems API to get a list of items to show the player, and at what price. All the other details of the items come from the master catalog, which your game would have already downloaded and cached using the GetCatalogItems API.

For this example, imagine we have set up the game to request a basic “gem pack” store with 4 basic gem packs:

Setting Up Player Segments

Now that the prerequisites are met, we can start implementing the targeted store.

First, we create PlayStream segments targeting the minnows and whales, as follows:

  • Minnows: spent >$10 and <= $100 in-game
  • Whales: spent > $100 in-game

To do this, we use the “Segments” feature of PlayStream. You can read more about creating segments in this blog post. Click on the Segments tab of PlayStream.

Now we can define each of the segments. Currently we have no way to define a segment based on life-to-date real-money spend (coming soon). As a work-around, you could track real-money spend as a player stat yourself, and increment the stat each time the player buys a real-money item.

For the purpose of this example, we will segment based on the number of gems each player has, since the only way to get gems is to buy them.

For example:

and

Create Special Stores

Next, create the two new stores that you will target to each of these player segments. These new stores will “override” the default store.

and

These stores have different items and can have different prices as well.

Set Up the Store Overrides for Targeted Segments

Finally, we bring it all together to target the different player segments with the different stores.

Go back to your original default gem store, and scroll down to the “Segment Overrides” section. You’ll see all of your segments. You can drag and drop the segments to rearrange them in the right order. The first segment to match is the one that will override. In each segment that you wish to target, you can then choose the store to use for the override.

In this example, we target the Minnow segment with the “Gem Store MN” store, and the Whale segment with the “Gem Store WH” store.

That’s it. Now, when the game requests the “Gem Store” store, the actual store returned will depend on the player’s segment. If the player is in either the “Minnow” or “Whale” segment then those are the stores that will be returned.

Consider a player with no gems. Then they will see this default store:

But, if we give the player 700 gems, then the player will see this store:


We hope you find this new feature useful. Please share comments and feedback in our forums -- your input is super valuable to us as we continue to invest in PlayFab going forward.