question

pawatl avatar image
pawatl asked

How I can push notification and add item into player at same time.

First I want to scheduled push notification and add item to player.

I try to use scheduled task in playfab console it not work(don't have any message into my device). But when I try to use FCM device is receive a message.

Question is : How I can push notification and add item to player at the same time(FCM).

Option : How to use scheduled task push notification on playfab.

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

·
Seth Du avatar image
Seth Du answered

For your question 1, I will provide with two solution:

    Solution one:

    • Create a push notification template at [Game Manager] -> [Content] -> [Push Notification Templates];
    • Create a Scheduled Tasks to grant items via Cloud Script to players at [Game Manager] -> [Automation] -> [Scheduled Tasks]. (you can select Run actions on each player in a segment)
    • Create a rule at [Game Manager] -> [Automation] -> [Rules] and trigger this rule via com.playfab_inventory_item_added event. Then the action is Send push notification.

    Solution two:

    • Create a Cloud Script that will grant player items and then call the API: server.SendPushNotification
    • Create a Scheduled Tasks to execute that Cloud Script at [Game Manager] -> [Automation] -> [Scheduled Tasks]. (you can select Run actions on each player in a segment)

    For the question 2, Scheduled Tasks can run Cloud Scripts, while you can use server API to send push notification in Cloud Script.

    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.