question

msmall avatar image
msmall asked

Can I pre-populate email template with PlayFab login email?

Hi there -

Sorry if this is answered somewhere else but I couldn't find it. We would like to send a player a custom welcome email when they register a new account through our app. We're sending the email to the email address we register as their PlayFab Login Email (Master player account).

In the custom email templates, I see that I can preopulate strings from fields like $Profile.ContactEmailAddresses$, but we're not using contact email address. Can I use $Profile.LoginEmailAddress$ or something like that?

Thanks!

Matt

Player Data
3 comments
10 |1200

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

msmall avatar image msmall commented ·

As a followup, we are now pushing the content of the Login email into the Contact Email, so I could potentially use the Contact Email -- however $Profile.ContactEmailAddresses$ seems to return null value. I tried $Profile.DisplayName$ and that worked fine. So any suggestions about how to get any of these email addresses to work? Thanks!

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ msmall commented ·

Detailed documentation about special keywords in email template is not available for now. We are planning to provide more options for users to customize email template in the future. As a result, you can send a thread on Feature Request forum and votes form other users can help with priority.

0 Likes 0 ·
msmall avatar image msmall Seth Du ♦ commented ·

Thanks Seth, although I don't really think this is a feature request. The help text on the email templates page does mention "You may personalize the email template by using variables for player, event, or email data.", and I verified that for example $Profile.DisplayName$ works. So all I'm really asking for is ... what are the variables for "email data" that the help text mentions? Or more specifically, is there a variable that will give me either of the contact email address or login email address?

0 Likes 0 ·

1 Answer

·
Andy avatar image
Andy answered

The list of available fields for player and event objects are actually linked from the help text on the email template page. Here they are:

player: https://api.playfab.com/playstream/profile/PlayerProfile

event (only common properties): https://api.playfab.com/playstream/events/player_ranked_on_leaderboard_version

Anything that's not in those two sets isn't available for the email templates, though we're open to requests.

2 comments
10 |1200

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

Andy avatar image Andy ♦♦ commented ·

Also worth noting is that anything in those two sets of properties that's not a primitive data type will not work the way you'd want in an email template. That means, for instance, that $Profile.ContactEmailAddresses$ cannot be used to display the user's contact email address(es).

0 Likes 0 ·
msmall avatar image msmall Andy ♦♦ commented ·

Thanks, Andy. That's the same link I used to get the player objects I tried before. But, back to my original question -- is there ANY way to display ANY of the user's email address(es)?

0 Likes 0 ·

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.