FAQ¶
How to reset user profile?¶
If you need to reset Smart Objects, including the System Profile, which stores all the Scripts, Events, Offers, A/B testing, Payments, and Segmentations, use Restart
method:
Balancy.LiveOps.Profile.Restart();
This method is asynchronous. All the callbacks will be called once again after the Reset is complete:
//It's called at the game start, when the profile is ready, and after the Restart.
ISmartObjectsEvents.OnSmartObjectsInitialized();
If you clear any profile or restart the System Profile, update all the links to them in your game, reloading the Profiles.
Why my offer doesn't activate?¶
There are 2 ways for activating Game Offers:
- Attach the Offer to Game Event. Once Event's Condition will trigger, attached offer will be activated. Make sure the user mets the condition to receive an offer.
- In Visual Scripting use Activate Offer node. Make sure the Flow of the Script is correctly leading to the node.
How to check server time?¶
You can always check server time in UTC+0
timezone using the following method:
Balancy.UnnyTime.GetServerTime()
How to undo deployed changes?¶
Currently it is not possible to undo deployed changes. Balancy team is aiming to to deliver this feature later. Stay tuned to our product updates.
Is it possible to start A/B test from the Script?¶
A/B test is active since the moment of creation. However, A/B test's Condition may be used to allow users to join the test. If test's Condition is based on some custom User Property, it is possible to set this property via Set UserProperty node into required state, so the Condition will become valid and the user will join the test. But you have to make sure the user will still be elligible to join based on Target Audience settings of the test. For example, that this user is still a new user.
Another way would be using Run Method node, which allows to call method from the client code. In the code you can use LiveOps.ABTests.StartABTestManually
function, as described here.
How to change A/B test Group for the user?¶
Currently, on the client side only, you can use LiveOps.ABTests.StartABTestManually
function, as described here. It will update the state of the test for the user as well.
How to delete a branch?¶
Once created, Branches cannot be deleted physically, but they can be hidden from UI and from exporting to the client, so they will not bother you and you can put them back to use easily, if you need.
Is it possible to purchase an offer if it is not active?¶
Game Offer's instance should be active and exist in the GetActiveOffers()
list to be available for purchase.
How to add new members to the platform?¶
Press on gear
icon next to project settings. Click on Members
to oper the list of user accounts allowed to work on this project. You can add more members to the project, if they already have their accounts on the platform.
How to create demo account?¶
Register on balancy.dev, verify your email and login to the platform. Now your account is ready for creating projects. We recommend starting from Shop Example
project, which has examples of some useful data structures and settings for LiveOps package.
How to connect Balancy with 3rd party analytics?¶
Balancy provides the list of callbacks, which you may use to receive important LiveOps events, such as new Offer activated/deactivated, A/B test started, Segment changed, etc... If you have external analytics platform integrated to your project, you can use these callbacks as a right place to send these events to your analytics as well.
How to Accelerate Balancy Launch Time?¶
Quick app launches are essential for a positive user experience, as delays can be off-putting. Balancy offers a solution for apps that can be launched offline, minimizing the impact of web requests on the initial user experience.
-
Pre-download Data:
- Prioritize downloading data before building your app.
-
Initialization with PreInit:
- During initialization of Balancy, use the parameter
PreInit = PreInitType.LoadStaticDataAndLocalProfile
. This approach ensures the app launches using locally available data.
- During initialization of Balancy, use the parameter
-
Handling OnInitProgress Callback:
- Monitor for two additional cases in the
OnInitProgress
callback:BalancyInitStatus.PreInitFromResourcesOrCache
andBalancyInitStatus.PreInitLocalProfile
. Full usage of Balancy functionalities is advisable after the latter status.
- Monitor for two additional cases in the
-
Background Initialization:
- Balancy continues to initialize in the background. Upon completion of online data and profile synchronization, the
OnReadyCallback
will notify you.
- Balancy continues to initialize in the background. Upon completion of online data and profile synchronization, the
-
Conflicts Resolving:
- Make sure you are resolving conflicts using the method
OnSystemProfileConflictAppeared()
, most likely you need to choose the Cloud version:Balancy.LiveOps.Profile.SolveConflict(ConflictsManager.VersionType.Cloud);
.
- Make sure you are resolving conflicts using the method
-
Immediate Functionality Post-PreInit:
- Most features, except A/B Tests, become operational immediately after
BalancyInitStatus.PreInitLocalProfile
. To enable A/B Tests without awaiting full Balancy initialization, set the A/B Test parameterPreInitLaunch
totrue
. Bear in mind, you won't be able to change any A/B Test parameters on the fly with this flag. You can only stop such a test or update it with the next app release.
- Most features, except A/B Tests, become operational immediately after
-
Final Initialization:
- Once all new updates form Balancy are downloaded and the cloud profile is loaded and synchronized with the local progress,
AppConfig.OnReadyCallback
andvoid OnSmartObjectsInitialized();
are invoked.
- Once all new updates form Balancy are downloaded and the cloud profile is loaded and synchronized with the local progress,
By following these steps, you can ensure a swift launch of your app with Balancy, offering a seamless initial user experience.
Additional advice:
- Don't do
Auth.SignOut()
beforeBalancy.Main.Init
, when usingPreInitType.LoadStaticDataAndLocalProfile
, because local progress won't be found and the new account will be created. - If a user deletes the game, the local progress will be lost, it means that in
OnInitProgress
you are getting an empty profile. Don't worry, once the cloud version is loaded, you'll get the latest progress atAppConfig.OnReadyCallback
. Make sure your code can work with changing profiles.
How to Integrate Existing User Purchase Data into Balancy?¶
When integrating Balancy into a product that's been in production for some time, aligning user segmentation by total spend can be a challenge, especially if users already belong to defined spending groups. Balancy does not inherently know these groupings without additional data.
Question: Is there a way to import existing total spend data upon first synchronization with Balancy, rather than re-processing each historical purchase?
Answer: You can streamline the integration of existing user data into Balancy by directly setting initial spending values rather than re-submitting each past transaction. This approach prevents unnecessary load on your server and avoids spikes in purchase statistics.
Here's how to implement this:
-
Check for First Balancy Launch: Determine if it's the user's first session with Balancy integration. This can typically be done by checking session data or a custom boolean flag in the user-property.
-
Set Initial Purchase Data: At the first launch, initialize the starting values for total purchases:
var payments = Balancy.LiveOps.Profile.GetPaymentsInfo(); payments.PaymentsCount = 10; // Total number of past purchases payments.TotalSpend = 999; // Total spent amount in USD payments.TotalSpendBalancy = 999; // Equivalent amount in Balancy's currency
-
Ensure Single Execution: Make sure to execute these initializations only once, ideally before any new purchases are processed. This ensures that subsequent transactions are added correctly without overwriting the initialized data.
By adopting this method, you can effectively integrate historical spending data into Balancy, allowing for accurate user segmentation and analytics without the need for re-processing individual transactions.