@francesco-lenolli
For both of your questions, a single call -- GetEligiblePromotions() will do the work. It will return the values of maxPurchases and the caller's purchased, as well as the Unix timestamps for triggeredForUserAt and 'expiresForUserAt` for automated promotions.

Posts
-
Discussion - Promotions -
App Store Receipt Signing Intermediate CertificateThank you for sharing this information. It does not have an impact on our server-side validation.
-
Segment Code Bug ReportHi @LEE-JONG-GUN,
Good news: the fix for the Segment
codefield clone bug has been deployed.What changed
- When you clone a Segment now, the
codefield is automatically appended with_copy(e.g.,myCodebecomesmyCode_copy). - The cloned segment's
codefield is editable, so you can change it to any unique value and save the clone successfully.
This resolves the duplicate-code issue that was preventing clones from being saved. Thanks again for the report.
- When you clone a Segment now, the
-
[Feature request] Support multiple Apple client IDs (aud values) for AuthenticateAppleThanks for the detailed report, you haven't missed anything, the current AuthenticateApple implementation only accepts a single Apple client ID. It performs a strict equality check on the token's
audclaim, so there's no built-in way to configure multiple valid client IDs. The implementation may be accepting a list of client IDs and checking membership instead of a single value. I'll forward this request to the team for consideration. -
[Feature Request] Design > Segments – Condition for missing attributes (or segment membership as an alternative)Thanks for the suggestion, you’re correct that current segment criteria only support value comparisons and simple membership/range checks, so there’s no explicit “attribute does not exist / is not set” operator, nor any way to reference segment membership (e.g., “is in segment X” / “is not in segment X”) in segment definitions, so we don’t currently have a real workaround that delivers the exact semantics you’re asking for, I’ll forward your request to the team for consideration.
-
[Unity] LobbyService.CreateLobby - Best time to show and hide a "Connecting..." popup?First, it's recommended to use
FindOrCreateLobbycall instead ofCreateLobby. It’s generally a better approach since it handles both cases — creating a new lobby if one doesn’t exist, or joining an existing one if it does. This gives your players a smoother experience when first trying to get into a lobby.Second, just to clarify the sequence: the
STARTINGevent doesn’t mean the lobby itself is starting, it happens after members have already joined and the server launch conditions are met. At that point, brainCloud is spinning up a game server for the lobby. You can find more details in our lobby documentation here -- https://docs.braincloudservers.com/api/capi/lobby/#lobby-eventsBecause of this, your loading spinner should remain active continuously after the
FindOrCreateLobbycall succeeds, since the user’s intent (“joining a lobby”) isn’t complete yet, from the user’s perspective, they’re still “joining a lobby” until they either:Receive
ROOM_READY→ success, hide the spinner.Receive an error → failure, hide the spinner and show an error.
This way, you avoid the hide → show gap, and the spinner matches the full lifecycle of the join process; it simply stays up until the full lobby join flow is resolved.
So in short: use FindOrCreateLobby, and keep the loading spinner up until you get either
ROOM_READYor a failure event. -
getMessagesPage with $or field not working probablyHi Kirlos, as you can see from the response's
messagefield, there are two elements (idandname) underneath, you need to append.idto specify the first search field forid, so change the"message.from"to"messsge.from.id"should solve this problem. -
Limiting number of async matchesYou may write a pre-hook cloud code script with your validating logic and integrate it with
[TurnShieldOn()](https://getbraincloud.com/apidocs/apiref/?cloudcode#capi-matchmaking-turnshieldon)method. -
Voting LeaderboardsThanks for pointing that out. This type of leaderboard isn’t directly supported by the current leaderboard APIs yet, but I’ll forward your feedback to our team for review.
In the meantime, as a workaround, you can create a Cloud Code script to handle it like a voting system -- the script can retrieve the player’s score and then post an additional “voted” score on behalf of that player.
-
Webhook routesHow about passing the slug as a parameter along with the webhook URL? This will allow your script to parse the parameter and perform actions accordingly.
-
Execute script when new user is registeredYou can hook the script to brainCloud authentication API and check the
loginCountfrom the response, the related doc can be found here. -
Segmentation suggestions based on latest usageThank you for sharing your suggestion with us. We will review it.