Skip to content

Commit

Permalink
Not so great store docs that will be improved in the next releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroRauizBeamable committed Dec 4, 2024
1 parent 77bb7dd commit 2f3eb12
Showing 1 changed file with 15 additions and 27 deletions.
42 changes: 15 additions & 27 deletions Docs/docs/features/stores.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,25 @@ img[src*='#center'] {
</style>

## Overview

Beamable's Store feature enables game developers to create an in-game storefront where users can purchase items using virtual currency.
Beamable's Store feature enables game-makers to create an in-game storefront where users can purchase items using virtual currency.

!!! note "Purchases IAP support"
Beamable supports purchasing listings using in-game IAPs, but for the Unreal SDK, this feature is not yet available. It will be added in future releases.

### Content Types

In Unreal Stores are represented by `UBeamStoreContent` class, which includes a store title and a list of links to `UBeamListingContent` types. The `UBeamListingContent` class contains all the details about the offer, such as player requirements, costs, and benefits. Both `UBeamStoreContent` and `UBeamListingContent` are subclasses of `UBeamContentObject`.

In Unreal, Stores are represented by `UBeamStoreContent` class, which includes a store title and a list of links to `UBeamListingContent` types. The `UBeamListingContent` class contains all the details about the offer, such as player requirements, costs, and benefits. Make sure you understand the [Content System](../features/content.md) as both `UBeamStoreContent` and `UBeamListingContent` are subclasses of `UBeamContentObject`.

#### Store Content
The store content has the following properties:
- **Show Innactive Listing**: Shows things that the user already bought and their outside of availability window or outside cohort settings.
- **ActiveListingLimit**: Defaults to 20. The Store will only show the first N listings that are valid. When asking for all active listings for a particular user, the API will return a maximum of whatever is here.
#### Listing Content
- **Price**: Is the definition of `currency` a player must have to acquire this listing.
- **Offer**: Describes what will be added to the player's inventory.
- **Client Data**: Use this to store information specific to your game's UI in a way that you can parse and display.
- **DateTime**: Is an active period is an ISO-8601 string.
- **Purchase Limit**: Number of times the listing is purchasable by the same user. Since its optional, absent means infinite purchases allowed while the listing other filters say you can buy it.
### Beam Store Subsystem
Purchases are handled through the `UBeamStoreSubsystem`. This subsystem allows you to request the purchase of any available `Listing` on any `Store`. It also provides helper functions to retrieve detailed data from listings, making it easier to interact with store content.

Purchases and operations on listings are handled through the `UBeamStoreSubsystem`. This subsystem allows the creation of a Purchase Listing Operation, which can then be committed to the Beamable servers. It also provides helper functions to retrieve detailed data from listings, making it easier to interact with store content.

## Getting started

The purpose of this guide is for game makers to setup a first store purchase using Beamable.

!!! note "Guide assumptions"
This guide assumes that game maker already has project with Beamable SDK up and running. If that is not the case please follow [Getting Started Guide](docs/guides/intro.md) first.

First open Beamable Content window and create a new Listing content:

![unreal-beamable-content-listing](./images/store-content-listing.png)

Then create a new Store content and add previously created listing as one of available ones in Store:

![unreal-beamable-content-listing](./images/store-content-store.png)

Then in Blueprint purchase can be performed like this:

![unreal-beamable-nodes](./images/stores-beam-nodes.png#center)

This is enough to perform a first purchase.
You can fetch a particular player's view of a particular store, via the `RefreshStoresOperation` or `RefreshStoreOperation`. After the view is refreshed, you can access the view for that particular player through `TryGetStoreView`. To make purchases, you can use the `PerformPurchaseOperation`.

0 comments on commit 2f3eb12

Please sign in to comment.