Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Deekshith · May 28, 2020 at 09:04 PM · CloudScriptPush NotificationsFriends

Player Name in Push notification template/ Localization of Push notification messsages

<Profile.DisplayName> can be used in push notification template but this will give the name of the player whom the notification is been sent.

I am implementing a friend system so when player A sends request to player B, player B should get notification which has name of player A.

How can this be achieved with push notification template?

If it cannot be achieved with this then how can language be fetched for user(which is been set in playfab) in cloudscript and based on the language , we can set custom messages and use SendPushNotification API. Is there any way to get player language in cloudscript?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by SethDu · May 29, 2020 at 03:20 AM

In terms of this scenario, a feasible workaround solution is to implement the function in Cloud Script/Azure function where you may manually craft the contents and call SendPushNotification API like you have stated.

There are language settings in players’ profile, you may retrieve information via GetProfile API. In the meantime, you may also consider storing language config anywhere else, for example, Player Data.

Comment
Deekshith

People who like this

1 Show 11 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Deekshith · May 29, 2020 at 06:08 AM 0
Share

GetProfile API - It cannot be called from cloudscript, right?

avatar image SethDu ♦ Deekshith · May 29, 2020 at 06:14 AM 0
Share

You may use Entity API like GetProfile in Cloud Script function via entity.GetProfile()

avatar image Deekshith SethDu ♦ · May 29, 2020 at 06:35 AM 0
Share

Could you give me an example on how to fetch the profile for a player with playfabid "ABC" in cloudscript?

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    Avoid push notfication errors when sending notification to friends 1 Answer

    Playfab action-event server system 1 Answer

    How to get the position (rank) of the leaderboard when you reset the leaderboard. And send a notification with rank? 1 Answer

    Get player ID by name 1 Answer

    How can I get the PlayFabId of a player by its DisplayName in CloudScript? 2 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges