question

Fuzail Sarang avatar image
Fuzail Sarang asked

Email Templates variables

Hi we are looking to provide a points(statistics) summary for a user. To do this we would need to get the ranking in the leaderboard for a user as well as the value of his leaderboard statistics.

I would just like to know what would be the best way to go about this? Should we create a cloudscript that generates an event with the relevant data? I read somewhere that event data is available in email templates.

Player DataCloudScriptLeaderboards and Statisticstest
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

Email template does support showing player profiles, however as you can see in PlayerProfileModel, only those properties with string type can be displayed properly in the Email Template. For example, $Profile.DisplayName$.

You are free to add a thread on our Feature Requests forum about it if there is no existing one. More votes from other users can help with the priority.

9 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.

Fuzail Sarang avatar image Fuzail Sarang commented ·

I am specifically referring to point 3 in the below statement

https://community.playfab.com/comments/21023/view.html

Would the above comment mean that I can pull information into the email template using a custom event?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Fuzail Sarang commented ·

Yes, For example, I set up a rule that will be triggered by player_statistic_changed event and it will send an email from template:

So in the template, you can write $Event.StatisticValue$ and it will show as 603 in player's email.

0 Likes 0 ·
Fuzail Sarang avatar image Fuzail Sarang Seth Du ♦ commented ·

Thanks, just what i needed

0 Likes 0 ·
Show more comments

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.