question

Muhammad Roshaan Tariq avatar image
Muhammad Roshaan Tariq asked

Send Rewards when Users open Push Notifications

Hi, I have requirement where I want to send free rewards to my players who were inactive for 1 week.

I have a manual scheduled task in which I send the Push Notification to a segment of players who were inactive but I also want them to get free lives as soon as they open the app using the Notification.

Concerns:

  • Is it possible to do that using Playfab Push Notification service or other modules? Can you share the document link?
  • And If no, then what is the work around?
Push Notificationsscheduled tasks
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 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

>> Is it possible to do that using Playfab Push Notification service or other modules? Can you share the document link?

For the clarification, in PlayFab, there is no such events can handle the notification’s clicks. If you want to reward the inactive players who click the notification. You can store the status of reward grant in the Player Internal Data.

You can add the action “Execute Cloud Script” before “Send push notification” in the corresponding Schedule Task. In the CloudScipt function, add the K/V pair “isReceivedRewardFromNotification=0” in the Player Internal Data. Then you can use this K/V pair as a detection basis when the player logs in. For example, you can write a CloudScript function to verify whether their internal data contains the above K/V pair, then grant the reward to users that meet the conditions. After you complete the reward grant, you can change the K/V pair to “isReceivedRewardFromNotification=1”.

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.