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 /
  • Bugs /
avatar image
Question by Yannka · Nov 29, 2018 at 07:03 PM · CloudScript

Call CloudScript on Segment entered event

Hey everyone,

I configured a segment with a CloudScript action to call whenever a player enter this segment.



However, I made a test yesterday (28/11/18). A player entered this segment at 9 PM (server time), but nothing seemed to have happened at all. I don't see any log, I didn't receive any email pointing any kind of problem, and I don't see anything in the Event History, even though I ticked the "Publish results as PlayStream Event". I analyzed all the events from 8PM to 6AM the next day, but no trace of any action.

Maybe I misunderstood something but I expected the CloudScript function "invitToPlay" to be called at approximately 9PM, when the player entered the segment, and to see the logs and results of this function in the Event History tab on the dashboard.

Did I do anything wrong?

Thanks,

Yannick

image.png (82.7 kB)
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 Brendan · Nov 30, 2018 at 07:17 AM

So, one thing to understand is the difference between an "active" profile element, and a "passive" one. When the player last logged in, what their regenerating VC balance is - those are things that are checked when required. They're not updated every second, for every player across all of PlayFab, as that would have an almost unlimited cost.

You cannot trigger a Rule based on a passive profile element, as there's no event triggering the Rule - there's no "player_has_not_signed_in" event. Rather, you would use a segment defined with that window of time for something like a Scheduled Task, run against the segment in question. When the Task runs, it automatically re-evaluates the segment, which updates the players and triggers your logic.

Comment
Brent Batas (Lisk)

People who like this

1 Show 3 · 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 Yannka · Nov 30, 2018 at 07:27 AM 0
Share

Thank you Brendan!
I have created a Scheduled Task that runs every hour on the players in this segment and now it is working like a charm :)

avatar image Brendan ♦♦ Yannka · Nov 30, 2018 at 08:07 AM 0
Share

Great! Did you also change the segment to only target a 60 minute span of time (so, players who haven't played for more than 1440 minutes, but less than 1500)? That way, you'll only be messaging each player once, and you'll be targeting the time of day they last played.

avatar image Yannka Brendan ♦♦ · Nov 30, 2018 at 08:15 AM 0
Share

Yes I did, thanks again :)

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

    Where did the Upload New Revision button go? 1 Answer

    GetFriendList return empty Tags array 1 Answer

    Cloudscript Revision Unexpected Error 2 Answers

    Cloud script execute more once 1 Answer

    currentPlayerId is different with every entity cloud script call 3 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