Initialize Customer (Register/Identify)
Register or update a customer whenever they log in or register in your app. This allows Gameball to attach events and rewards to the customer profile.Request Parameters
Push notification provider:
PushProvider.firebase or PushProvider.huawei. Required if deviceToken is set. The SDK sends it to the Gameball API as pushServiceProvider.Optional session token to override the global token for this specific request. Required in upcoming SDK v4.
In Flutter SDK, passing a sessionToken parameter updates the global token. Pass
null to clear, or omit to use the current global token.Validation Rules
InitializeCustomerRequest requires:customerIdcannot be null or empty- If
deviceTokenis provided,pushProvidermust also be specified - If
pushProvideris specified,deviceTokenmust also be provided
CustomerAttributesBuilder Methods
Build customer attributes using the builder pattern:Show Customer Profile (Widget)
Display the Gameball customer profile widget to show rewards, campaigns, and leaderboards:Hide navigation elements.
Validation Rules
- No required fields (guest mode supported). Provide
customerIdfor authenticated profiles. closeButtonColormust be in hex format (#RRGGBB) if provided