Gameball Developers Guide
v3.0
v3.0
  • Introduction
  • What's New in V3.0
  • Installing Gameball
    • Web
      • Show Gameball Customer Widget
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Go-Live Checklist
    • iOS
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • Android
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
    • React Native
      • Getting Started
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
      • Go-Live Checklist
      • Migration from v1 to v2
    • Flutter
      • Getting Started
      • Initialize Gameball SDK
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Referrals
      • Go-Live Checklist
    • Generic Mobile App
      • Initialize Gameball Customer Profile
      • Track Customer Events
      • Track Orders & Cashback Reward
      • Integrate Redemption
      • Track Referrals
      • Push Notifications
    • Retail & Modern POS
      • Initialize Gameball Customer Profile
      • Track Orders & Cashback Reward
      • Track Refunds
      • Enable Redemption
        • Prepare POS for Redemption
        • Using Virtual ID
          • Using Virtual Card
  • REST API
    • Overview
      • Server-Side SDKs
    • Authentication
    • API Reference
      • Customer
      • Event
      • Transactions
      • Order
      • Coupons
      • Leaderboard 👑
      • Notifications 👑
      • Configurations 👑
      • Batches 👑
        • Batch Operations Data
      • OTP
      • Partner 🤝
        • Client 🤝
        • Redemption Rule 🤝
        • Cashback Rule 🤝
    • Webhooks
      • Notifications Webhook
      • Customer Profile Webhook
    • Errors
    • Object Reference
  • Tutorials
    • Build Custom UI Elements 👑
      • Display Reward Campaign Progress
      • Show VIP Tiers
      • Show Customer Points Balance
      • Build Leaderboards
      • Show Notifications Inbox
      • Adapt UI to Configurations
      • Advanced UI Techniques
        • Increase Sales with Cashback UI Elements
        • Derive Engagement with Rewards Campaigns UI Elements
    • Tracking Customer Events
    • Build your Own Notification System
    • Checkout Integration Example
    • Redemption Integration Options
      • Redeem with coupon system
        • Integrate your coupon system
          • Example using e-commerce platform(WooCommerce)
          • Example using a custom coupon system
        • Build couponing experience
          • Using Gameball widget
          • Build custom experience
            • Showing customers available points
            • Allowing customers to create coupons
            • Apply the discount code to your cart
        • Coupon integration reference
      • Redeem with direct debt
        • Get customers points balance
        • Redeem customer points
  • Third Party Integrations
    • Segment Integration
Powered by GitBook
On this page
  • Making use of the control declaratives
  1. Tutorials
  2. Build Custom UI Elements 👑

Adapt UI to Configurations

PreviousShow Notifications InboxNextAdvanced UI Techniques

Last updated 1 year ago

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 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 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.

Configurations API
Configurations API