question

stefan avatar image
stefan asked

Action in Entered Segment not fired

Hi,

I have a currency that charges over time. When it is full, I want to send the player a push notification. I generated a segment for this:

Player:
Virtual currency balance (EN) is greater or equal to 10.

Action for entered segement:
Send push notification: My notification template


Unfortunately, no notification arrives even though the energy is full again. However, as soon as I log into Playfab and go to the "Segments" page, the actions for entered segement are triggered. But not by itself, what am I doing wrong here?

Thank you!

Stefan

scheduled tasks
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

·
Sarah Zhang avatar image
Sarah Zhang answered

We tried to use your condition to push several players to our testing segment, the actions set for [Entered Segment] can work fine. As the service status page showed, there was a known issue that caused delayed Play Stream event processing. This issue should have been fixed now. Could you please check again? If the issue still exists, could you please provide your TitleId for our investigation?

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

stefan avatar image stefan commented ·

Thanks, I just tested it again. Unfortunately it still doesn't work. The currency recharges every 25 minutes, I spend 1 energy (EN) and thus had 9 EN and after 45 minutes there was still no notification. But as soon as I log into Playfab, go to the segment page, the notification suddenly comes. Or when I go to the player and go to the "Virtual Currency" tab the notification is also triggered.

Unfortunately, it doesn't happen automatically. Ideally, the notification should reach the player after 25 minutes (as soon as the currency is fully charged again). So that the player continues to play.

The TitleId is 773F5. Segment is "PlayerHasFullEnergy".


Thanks for helping and investigation,

Stefan

0 Likes 0 ·
stefan avatar image stefan stefan commented ·

I've tried a few more things now and it looks like the currency won't charge itself (if the value is not picked up or displayed).
The event is only triggered as soon as the player logs in again or you load the value on Playfab (Virtual Currency tab). Probably the recharching of the currency is not always updated automatically in the background. I think it's a bug though?

What I also tried, I created a scheduled task, that calls a cloud script with server.GetPlayersInSegment ({SegmentId: "49A44063205D95FE"}); every 5 minutes. But unfortunately it doesn't help either.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang stefan commented ·

Thanks for your response. We followed your steps and reproduced the behavior you mentioned.

For clarification, this behavior is by design. As this thread said, virtual currencies are only updated when required, for example, calling the API GetUserInventory, checking the VC tab etc. Currency recharging is not designed to be real-time.

For your case, you can set a scheduled task so that you can check the player's current currency in a certain of frequency, for example, calling the API GetUserInventory once hourly to update the currencies manually.

1 Like 1 ·
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.