Idea

Vivek Deshpande avatar image
Vivek Deshpande suggested

Pass EventData as a parameter in a CloudScript triggered via Prize Tables

I'm trying to create a delayed rewards window that shows up when a leaderboard finishes and the user has placed inside one of the specific reward tiers. To achieve this, I'm triggering a cloudscript function as part of the prize table which stores the reward tier. I'd also like to store his final leaderboard score and the leaderboard version. Looking at the raw event data, I see that a JSON container already exists which has this information embedded (named "TriggeringEventData").

I'd like to request having a boolean that , when checked, passes this data from a prize table to a cloudscript function as a parameter.

CloudScriptLeaderboards and Statistics
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Comment

·
brendan avatar image
brendan commented

That information is already sent to the Cloud Script you're triggering in the Prize Table. All PlayStream Action-triggered Cloud Scripts are sent the player profile info and the event details in the context. In the case of a Prize Table Action, the event is player_ranked_on_leaderboard_version.

Have a look at this guide for more details on how to use the context in Cloud Script: https://api.playfab.com/docs/tutorials/landing-automation/using-cloud-script-actions-with-playstream

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Vivek Deshpande avatar image Vivek Deshpande commented ·

Oh, I completely forgot about the context param. Thanks!

0 Likes 0 ·

Write a Comment

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.