Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Brite
  • 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
  1. Home
  2. General
  3. Two Questions: Follow System & Referral Rewards

Two Questions: Follow System & Referral Rewards

Scheduled Pinned Locked Moved Solved General
5 Posts 3 Posters 446 Views 3 Watching
  • 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 on 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 on 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
      • G Offline
        G Offline
        gyutaelee
        wrote on last edited by
        #3

        Thank you for your kind response as always.
        Have a great day!

        1 Reply Last reply
        0
        • G gyutaelee has marked this topic as solved on
        • johnhJ Offline
          johnhJ Offline
          johnh
          wrote on last edited by
          #4

          Case 5996

          1 Reply Last reply
          0
          • johnhJ Offline
            johnhJ Offline
            johnh
            wrote on last edited by
            #5

            Hi @gyutaelee I am bringing this to the dev team for further discussion. thank you for suggesting it.

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

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