Adapt UI to Configurations

When your building UI element for your app\webpage, It is very important to make these elements adaptive to your current programs configurations in Gameball. For example, consider a business decision to disable Gameball cashback program during the financial year closing. Hence your UI should adapt and hide any element related to cashback in that time.

The above requires code changes and releasing for every change in the Gameball programs configurations to your app\webpage. Which is not an optimal way to handle this.

Gameball offers the Configurations API which is an essential endpoint to use while building your own UI to keep all configurations related to Gameball variable. No need to update your loyalty program static content inside your website or mobile app every time you change them through Gameball dashboard.

This API call is used to retrieve your configured Gameball Settings along with all Gameball Programs Configurations. This endpoint allows you to retrieve your configured settings on Gameball account which can be used while creating your custom UI for the customer profile on your website or mobile app.

Making use of the control declaratives

In addition to returning your program's configurations, the Configurations API returns a list of control flags to help in decoupling UI changes from business decisions and changes.

To avoid re-deployment, you can make use of the control declaratives which reflect business decisions managed through the dashboard like enable/disable Gameball, show Gameball notifications, enable cashback, and many others. Consider the below snippet from the Configurations API response object. The controlConfig object holds flags for the statuses of each Gameball program as per your configuration

{
...
...
"controlConfig":{
    "gameballEnabled":true,
    "redemptionEnabled":true,
    "cashbackEnabled":true,
    "referralEnabled":true,
    "enableVisitorProfile":true,
    "enableUserProfile":true,
    "enableLeaderboard":true,
    "enableNotifications":true,
    "enableAchievements":true
}
...
...
}

For example when the flag cashbackEnabled value is set to false all UI element related to cashback should be disabled\hidden. Same applies to other programs flags. gameballEnabled flag is the main flag reflecting the status of the overall Gameball status. Hence when this flag is false all Gameball related UI elements should be disabled\hidden no matter what is the status of the indivisual programs flags.

Last updated