Introducing the New Experience Event APIs

Hi Creators,

We are excited to announce two new APIs that allow you to prompt a user to RSVP to an upcoming experience event (or update) from within your experience.

Experience events and updates are a great way to notify users about upcoming updates to your experience or to highlight live events happening within it. These new APIs have already started rolling out and you can use them in your experience right now!

Here is an example of what this new prompt UI looks like:

We may modify this UI in the future to provide more information about the event, so if you have any feedback, please let us know!

Details

We have added two new methods to SocialService:

Enum.RsvpStatus GetEventRsvpStatusAsync(eventId: string)

  • Gets the RsvpStatus of the local player for the given eventId. RsvpStatus is one of Going, NotGoing and None.

Enum.RsvpStatus PromptRsvpToEventAsync(eventId: string)

  • Prompts the local player to change their RsvpStatus for the given event. If the user is not following the event, they will be given the option to follow it. If the user is already following the event, they will be given the option to unfollow it.

These methods only work with events and updates in the current universe that have not already started. The eventId should be used as a string - currently, eventIds are random 64-bit ints, and some eventIds do not fit inside the maximum Lua number that can be represented without precision loss. We may also change the eventId to be a UUID in the future.

Sample Code

The following script has RunContext set to Client and is placed in a podium to notify users about the new event, featuring two proximity prompts: one for following the event and one for unfollowing it. The proximity prompts are enabled or disabled based on the player’s RSVP status.

Code Sample

Click here to view a sample of the code!
  local SocialService = game:GetService("SocialService")

  local EVENT_ID : string = "YOUR_EVENT_ID"

  local unFollowPrompt : ProximityPrompt = script.Parent.UnfollowProximityPrompt
  local followPrompt : ProximityPrompt = script.Parent.FollowProximityPrompt

  local function updatePrompt(rsvpStatus : Enum.RsvpStatus)
    if rsvpStatus == Enum.RsvpStatus.Going then
      unFollowPrompt.Enabled = true
      followPrompt.Enabled = false
    else
      unFollowPrompt.Enabled = false
      followPrompt.Enabled = true
    end
  end

  local success, currentRsvpStatus = pcall(function()
    return SocialService:GetEventRsvpStatusAsync(EVENT_ID)
  end)

  if not success then
    -- Could not retrieve RSVP status, don't enable either proximity prompt
    warn("Failed to get RSVP status:", currentRsvpStatus)
    return
  end

  print("CurrentRsvpStatus:", currentRsvpStatus)

  updatePrompt(currentRsvpStatus)

  unFollowPrompt.Triggered:Connect(function(player)
    local rsvpStatus = SocialService:PromptRsvpToEventAsync(EVENT_ID)
    updatePrompt(rsvpStatus)
  end)

  followPrompt.Triggered:Connect(function(player)
    local rsvpStatus = SocialService:PromptRsvpToEventAsync(EVENT_ID)
    updatePrompt(rsvpStatus)
  end)

Known Issues

We have noticed a slight issue with the formatting of Event Descriptions. Our team is currently working to address this issue. For now, you are still able to adjust the text how you seem fit, or not use the prompt.

These APIs are currently disabled on console due to a bug with the gamepad button selection there. You can pcall these APIs as shown in the code sample to work around this if you want to use it before it’s available on all platforms.

We will update you once these issues have been fixed.

What’s Next

Our vision for Experience Events & Updates is that it is a premier channel for you to announce upcoming content and features for your experiences, and to build awareness and excitement among your community! We are also working on potential changes to how events and updates are surfaced in the Home and Charts tabs, as well as in Analytics tools, to help you track the effectiveness of each event and understand how to improve them.

Let us know if you have any questions or feedback on other experience events/updates-related APIs that you would like to see!

Thank you.

211 Likes

This topic was automatically opened after 10 minutes.

To be honest, I thought it was going to be the “Join group” prompt. It’s just the “Join event” prompt.

But anyways, still pretty awesome :fire:

More people will join the events we make :blush:

54 Likes

Seems like a cool small addition, finnaly being able to add events through ingame

However, i am still waiting for the “Join groups while playing” addition which doesn’t seem to be added yet…

28 Likes

Entirely new prompt for a relatively new feature yet still no join group prompt…

38 Likes

we need a join group prompt please!!! I am concerned about cash grab games using it too much as Roblox probably is, maybe a limit could be possible

22 Likes

can we expect a Join Community prompt in the future? this would greatly benefit many games that rely on groups for ranks e.g. cafe / millitary roleplay games. it would make those genres much more easier and accessible to both developers & players

13 Likes

group invite prompt when

12 Likes

For power-users who are interested in fetching experience event information before a proper engine API is implemented, could we get the https://apis.roblox.com/virtual-events/v1/universes/{universeId}/virtual-events endpoint allowed on HttpService?

8 Likes

I know everyone is complaining about this not being the group prompt but this rocks anyway.

10 Likes

Thank you for the feedback on the need to access event information. I can definitely see the need here as it would allow you to easily integrate this prompt without needing to modify the code for each event. We will consider the best way to support this, either through another engine API or through OpenCloud and HttpService.

14 Likes

We are so back but holy guac does it take twelve years to add a join group prompt please god

14 Likes

Would be sick if we had join group prompts too…

13 Likes

That’s awesome! Maybe another few years and we will get the group/community join prompts we were promised at the RDC back in 2021

8 Likes

This new API is very cool! I’m hoping there will also be an API to retrieve all event information for the experience. It would be great to have details like the event name, description, thumbnail, start and end dates, and whether the player is following the event.

We have a start menu that always shows upcoming special events on specific days. This function would allow us to match events directly by name from the event list and show a notification button to the player, without having to manually change event IDs in the script each time. Other experiences could also use this to create a list of upcoming events in their games.

10 Likes

Thank you for this amazing event feature. On topic of the join community/group feature, I never had this cross my mind once as something that should be added cause I never thought of it, but seeing these comments now, it would be a very beneficial feature to build way larger and stronger communities/groups, reducing the user-experience friction of leaving a game to go and find a specified group and press join on a whole separate page from the game/experience.

5 Likes

I WISH! How come they be releasing a prompt for events before releasing the group join prompt anyways, a decade old feature request with massive support and they recently clarified they’re intending to do it too! They gotta be trolling atp

5 Likes

For what do we need a join group prompt? Events reach more people than group shouts. It could be cool still, but I like this.

2 Likes

For people to join groups easily without having to quit the game and many more reasons wdym lol :sob:

8 Likes

Roles in games. But I guess it can also be used for group rewards.

2 Likes