• 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

Two Questions: Follow System & Referral Rewards

Scheduled Pinned Locked Moved Unsolved General
2 Posts 2 Posters 12 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gyutaelee
    wrote last edited by gyutaelee
    #1

    Hi BrainCloud team, we have two questions about features we're trying to build.


    1. One-Way Follow

    We want Player A to follow Player B, but B doesn't have to follow back.

    The Friend API requires both players to agree, so it doesn't work for us.
    Is there a BrainCloud API designed for one-way follow relationships?

    Also — can GetPresenceOfUsers(profileIds[]) fetch profile data for any player,
    or does a Friend relationship need to exist first?


    2. Referral Rewards for Both Players

    Our referral flow:

    1. Player A shares their referral code
    2. Player B enters the code
    3. When B reaches level 3, both A and B receive a diamond reward

    The challenge is rewarding A (the referrer). We store A's profile ID in a
    Custom Entity when B registers the code, so we always know who referred whom.

    Two questions:

    a) Does BrainCloud support running a CloudCode script when a Milestone is
    completed
    ? If yes, we could use a Milestone to reward B automatically at
    level 3, and use that script to look up A's profile ID and reward A as well —
    no client-side trigger needed.

    b) If not, is there any other server-side mechanism in BrainCloud that can
    reward a different player when a specific event occurs?


    Thanks!

    1 Reply Last reply
    0
  • J Offline
    J Offline
    JasonL bitHeads
    wrote last edited by
    #2

    Hi @gyutaelee,

    1. For one-way follow: brainCloud doesn’t have a built-in one-way “follow” graph, so you’ll need to implement your own follower/following system using one of the user data mechanisms (e.g. global or entity data) to track who follows whom. This keeps it independent of the Friends API, which is designed around mutual relationships. GetPresenceOfUsers() works with any valid profile IDs, it does not require a Friend relationship between the players to return presence info.

    2. For the referral rewards question: I’m going to forward this to our team to review the best server-side approach for triggering rewards for both the referrer and referee once the milestone (like reaching level 3) is reached.

    Thanks for the detailed explanation of your use cases.

    1 Reply Last reply
    0

  • Login

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