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 /
  • General Discussion /
avatar image
Question by Gerar · Feb 04 at 07:07 PM ·

Sending an automated email after level is completed

Good day!

Our sales department would like to reach players by sending them an email with a discount code.

The thing is that they would like to introduce a delay of 45 minutes from the moment the player reaches the success screen until the mail is sent.

We are currently storing the time the player takes to finish the game in the field name "GameCompletionTime".

We have set the SMPT add-on, made an email template and created the correspondend scheduled task, but we are lost on what are we supposed to code in the JSON cloud script in order to achieve the expected result.

Could somebody who has done this before give us a hand?

Thanks in advance for your time and help,

Gerardo from SkyrocketYourTeam.com



Comment

People who like this

0 Show 7
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 Citrus Yan ♦ · Feb 05 at 03:30 AM 0
Share

To better understand your scenario, may I know more details about your current flow, like the configurations of the scheduled task, how "GameCompletionTime" is used, etc. ?

avatar image Gerar Citrus Yan ♦ · Feb 05 at 01:03 PM 0
Share

Thank you for your answer!

The configuration of the scheduled task is a question for us on its own.


We get some functions available (probably coming from the photon integration?) in the drop down menu but we are not very sure how to use them.

Gamecompletion time is curently storing the time (in seconds) that passes between a player starts playing until the escaperoom is completed, and it shows up in the success screen letting the player know how long it took for him/her to complete the room.

The question is how to extract that time to put it into the email, which on its own would need to be sent when this value is created. Or can it be done by using the function "completed level" so after the last level is completed, the email is sent?

In any case, we don't really know what to write in the JSON code to make it work.

Thank you very much in advance for your time and help!

scheduledtask.png (81.4 kB)
avatar image Citrus Yan ♦ Gerar · Feb 08 at 09:10 AM 0
Share

First, those functions in the drop down menu are not supposed to be used in your case. And, is Gamecompletion stored in Player Data? In that case you can not extract it to put into the email because only the following data can be personalized:

  • Player Profile: https://docs.microsoft.com/zh-cn/rest/api/playfab/server/account-management/getplayerprofile?view=playfab-rest#playerprofilemodel
  • Triggered Event's data
  • Email data

Please check out the "What's this" section in the "New Email Template" page for more details:

snipaste-2021-02-08-17-05-18.png (20.8 kB)
Show more comments
avatar image Gerar · 2 days ago 0
Share

Thank you ery much @Citrus Yan for your detailed answer. We will give it a go and see where do we get!

Regards from Estonia and have a lovely start to the week.

avatar image Citrus Yan ♦ Gerar · yesterday 0
Share

Thanks, have a nice week:)

0 Replies

· Add your reply
  • Sort: 

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

    2 People are following this question.

    avatar image avatar image

    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