• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums

administrators

Private

Posts


    Questions about brainCloud Friends and Social Leaderboard behavior
  • J JasonL

    Hi @gyutaelee ,

    Thanks for the detailed questions.

    1. Friend Relationship Direction - Yes, bidirectional

    • AddFriends: When user A calls AddFriends([B]), both A and B see each other in ListFriends("brainCloud")
    • Both A and B will appear in each other's GetSocialLeaderboard results (if they have scores)
    • RemoveFriends: Removes the relationship from both users atomically

    2. Idempotency - Yes, both are idempotent

    • Calling AddFriends([B]) when already friends: No-op, no error thrown (skips DB write)
    • Calling RemoveFriends([B]) when not friends: No-op, no error thrown

    3. Consistency and Caching - Immediate

    • Friend changes are persisted immediately to the database (no write-behind caching)
    • ListFriends("brainCloud") and GetSocialLeaderboard reflect changes immediately after AddFriends/RemoveFriends
    • No eventual consistency or caching delay

    4. Friend Count Limits - No hard cap

    • No code-enforced limit on brainCloud friends per user
    • Practical consideration: Friend IDs stored as array on UserProfile; very large arrays (>10K) may impact read/write performance

    5. GetSocialLeaderboard Behavior - Returns all friends + self + pacers, no limit

    • Returns all recognized friends + self + pacers
    • No hidden maximum result count
    • Pacers are included (if leaderboard has pacers configured)
    • Warning: Response payload grows linearly with friend count

    6. Recommended API for Top-N - Yes, use GetMultiSocialLeaderboard

    • GetMultiSocialLeaderboard with a single leaderboard ID is a correct approach for top-N results
    • leaderboardResultCount is applied after social filtering and score sorting
    • leaderboardResultCount is capped by maxMultipleLeaderboardScoreLimit app property (default 10, can be raised in app-basis)
    • Preferred over GetSocialLeaderboard for top-N because it has built-in truncation

    7. Social Leaderboard Pagination - Not supported

    • No GetSocialLeaderboardPage API exists (only GetGlobalLeaderboardPage for global leaderboards)
    • Social leaderboards always return the full friend set (potentially truncated by leaderboardResultCount only in the multi variant)
    • I will forward your pagination request for team review

    8. Billing and API Counts - 1 API call per request

    • GetSocialLeaderboard = 1 API call regardless of friends/entries returned
    • GetMultiSocialLeaderboard = 1 API call even with multiple leaderboards
    • AddFriends/RemoveFriends = 1 API call even though they modify both users' profiles

    9. Recommended Usage - Yes, your design aligns perfectly


  • Question about using unique indexes for Custom Entities
  • J JasonL

    Hi @gyutaelee,
    Currently, brainCloud blocks unique indexes on all custom collections as a blanket safeguard. The check happens unconditionally before the system even evaluates whether your collection is owned or sharded, so it rejects the unique option with that error.

    We can manually add the unique index for your FOLLOW collection on our end. Please send us a request with:

    1. Your appId
    2. The entityType (is it FOLLOW only?)
    3. The field name(s) that need uniqueness
    4. The desired index name (e.g., test_index)

    Once we receive your request, we'll add the uniqueness constraint for you directly.


  • Automated Promotion not associated for users already in target segment
  • Paul WinterhalderP Paul Winterhalder

    Ah - great to hear @jongdae-won . Thanks for the update!


  • Automated Promotion not associated for users already in target segment
  • Paul WinterhalderP Paul Winterhalder

    That patch has been deployed @jongdae-won - give it a try!


  • Automated Promotion not associated for users already in target segment
  • Paul WinterhalderP Paul Winterhalder

    Hi @jongdae-won,

    We have a patch being deployed today that will allow you to create promotions that will allow you to target both existing and new members of a segment. We plan to have that deployed by the end of the day.

    2026-05-26_11-46-14.png

    We hope that this will address the primary issue.

    Your latest message seems to indicate that even new users to a segment are not getting the promotion offer... that does seem odd. I will point out that segments only get refreshed nightly and upon login - so if a new stat meant that they should be added to a new segment - the new segment and/or promotion wouldn't be refreshed until they logged back in again...

    Unless... your app is making this call before it brings up the store:
    https://docs.braincloudservers.com/api/capi/appstore/refreshpromotions

    Could that be [that specific] issue?

    In any event - we are hopeful that the patch should address your primary concern. We'll post here once it has been deployed.

    Paul.


  • Admin Billing API request
  • Paul WinterhalderP Paul Winterhalder

    Hi @dbgtdbz2 - we certainly don't have an api for that sort of thing right now.

    Can you send a private chat in via the support system - addressing me - and give me a heads up of what you're up to?

    Thanks!

    Paul.


  • Admin Billing API request
  • J JasonL

    I’ll forward your request to the team for review...


  • Automated Promotion not associated for users already in target segment
  • J JasonL

    Yes, the behavior you’re describing is expected with the current implementation. RefreshMySegments, RefreshPromotions, and login will not attach the promotion to users who are already in the segment, because the system is designed to only grant automated promotions when the user enters the segment (i.e., when it shows up in enteredIds). The fact that Reset Segments or Re‑evaluate All Segments fixes it is also expected, because those actions force the user back through the segment‑entry logic.

    We’re working on a fix to make this smoother. The practical effect going forward will be that, when a new automated promotion is created or attached to an existing segment, the next segment refresh will automatically apply it to all currently‑eligible users in the background, without you needing to reset or re‑evaluate segments manually. This should make the behavior more predictable, especially when you have a large number of existing users already in that segment.


  • Question about timing for newly deployed Automated Promotions
  • J JasonL

    Our automated promotions were designed to pull members of a segment into a promotion, which is why they can trigger notifications. When an automated promotion fires for a user, they can be notified, and that notification is intended to draw them back into the game. So startTime is effectively the wall‑clock time when the batch job processes that user, not when the user logs in. A user who never logs in will have their promotion silently expire in the background.

    I’ve forwarded your request to our team to see if we can look at adding a flag that lets developers specify that an automated promotion should only trigger on login, which would likely align well with the kind of “starter‑package” use case you described.


  • [Feature Request] Add "Open in New Window" option for Owner ID in Custom Entity view
  • J JasonL

    Thanks for the suggestion and the explanation of the workflow benefit. I’ll bring this request to our team for review and follow up here...

Member List

bcadminB bcadmin
Mark DouthwrightM Mark Douthwright
J JasonL
C Claire Raby
Markus DouthwrightM Markus Douthwright
C Corey Clarke
Adam PilkingtonA Adam Pilkington
Paul WinterhalderP Paul Winterhalder
R Roger Masse
  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users