question

Irina Fikhgendler avatar image
Irina Fikhgendler asked

Best way to create popup promotion on login e.g.: which objects to use (catalog/store items, rules) ?

10 |1200

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

Seth Du avatar image
Seth Du answered

Sorry for the late response. As a fact of current design of PlayFab, the Cloud Script cannot actively open a popup on your client. Your client need to actively retrieve data and open the popup. You can use on-login event to trigger a rule but the login API is not strictly restricted, you need to make sure it is not used abusively, for example, you can add more filters in the condition field).

10 |1200

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

Seth Du avatar image
Seth Du answered

May I ask the detailed scenario? If you want to provide a sales for Catalog Items, you may consider implementing Store Feature of PlayFab. Please refer to https://docs.microsoft.com/en-us/gaming/playfab/features/commerce/stores/.

10 |1200

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

Irina Fikhgendler avatar image
Irina Fikhgendler answered

Sure, thank. Very standard scenario:

1.Define promo in PF (show to player on login popup with promo item: image + "Collect NN Golds") - and set own NN for each player level
2. Implement in code defined promo by PF data

What is best way to 1 ? To 2 ?

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.

Seth Du avatar image Seth Du ♦ commented ·

I assume the player level should be stored somewhere safe that players cannot directly interact, and Player Read-Only Data should be fine. It can only be updated on the server side, for instance, by Cloud Script function. Moreover, I assume the Golds are the rewards every time a player levels up.

1. You need to set a flag for the players to determine if they have been rewarded in Player Read-Only Data or Player Internal Data

2. The Level information should be stored in Player Read-Only Data and the formula expression to calculate "NN" gold from level should be stored locally in game client, so that once the client retrieve the level, there is no need to send additional APIs for retrieval.

3. Players click the popped promo in the client and ExecuteCloudScript API should be called. The Cloud Script function you have defined will firstly check the flag (defined in Step 1) to ensure the reward hasn't been granted for this player. Then use the formula expression (defined in Cloud Script function) to calculate the gold number, then grant. After that, remember to mark the flag as granted.

0 Likes 0 ·
Irina Fikhgendler avatar image
Irina Fikhgendler answered

avatar imageSethDu, thanks!
I mean more automation with PF.
E.g., I can grant to player on event login some item with rule.
But there is not popup.
I can create other rule to run CloudScript. Can I open such popup and fully process results with CloudScript only ?

10 |1200

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

Irina Fikhgendler avatar image
Irina Fikhgendler answered

Rule implemented dialog on event login

10 |1200

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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