Show VIP Tiers
Configurations API can be used in many scenarios when building your own UI. It provides information about the current program's configurations, in addition to control declaratives that can be managed from your Gameball’s account dashboard. Let's assume that within your app you would like to build a page for your customers, where they can see the available VIP tiers that they can reach, along with each of the benefits they will get when reaching this VIP tier.
In order to do so, all you need to do is to call the configurations API and process the VIP tiersarray within the response. Take a look at the below snippet where it shows a sample VIP tierslist as returned within the configuration response.
Four VIP tiers are configured within the program: Basic, Silver, Gold and Platinum. Each with its benefits, name and icon. In your custom UI screen you can bind the VIP tiers array accordingly to build your own VIP tiers screen.
Using the Lang filter
In case your app or web page supports different locales and changes based on your customer's preferences. After configuring your supported locales in Gameball, you will need the API response text to match the locale of the current customer.
To do so, you can provide the optional Lang query filter to your API call so that Gameball can respond using the corresponding configured locale.
In order to better understand how to configure your languages and know their respective language codes, check this article in our Help Center.
For example, if your app supports English and French, and the current customer using the app selected French as his preferred language. All you need to do is to call the API as follows:
Show Customer VIP Tier Progress
Now that you have shown the configured VIP tiers in your program. You may need to show the current logged-in customer VIP tier progress. This can be done by using the Progress API in addition to the Config API to create a progress bar, a VIP tier indicator, or any other visual element that shows the customer 's progress. By displaying progress to customers, you can provide a sense of accomplishment and motivation for the customers to keep progressing.
After consuming the configuration API and getting the configured VIP tiers array you need to call the Retrieve Customer API with the current customer playerUniqueID as below
The response will result in a summarized view of the customer 's progress over various Gameball programs as VIP tiers and points. For the scope of this tutorial we will only focus onlevelsProgress
object.
Now that we have the all VIP tiers array from the configurations API and the current
player VIP tier + the next
level progress
we can achieve a similar UI to the below
Last updated