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 /
  • PlayStream /
avatar image
Question by Ian Oliver · Nov 11, 2016 at 06:13 PM · Player InventoryPlayStream

Is it possible to have PlayStream event when an inventory item expires?

An inventory item can be set to have multiple consume options. In particular, we are using inventory items for special offers that expire at a set time.

What we would like to track is the difference between special offer consumes (i.e.: purchase) and expiration. From the docs, and some testing, it appears that player_consumed_item does not fire when an inventory item expires and there is no corresponding expiration event. Specifically we would like to trigger actions when an inventory item expires...

Is there another way of tracking expiry that I am missing, or can we get a player_expired_item (or something similar) added to playstream?

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 11, 2016 at 10:14 PM

When any action occurs which "touches" the player inventory (like a call to retrieve the inventory), there's a pass to check the expiration times for consumables, and any which have expired since the last time the inventory was touched are removed. A service that tracks every consumable object and expires them in realtime, even if there's no player activity, would be expensive to operate. For us to be able to offer a free tier, and keep prices as low as possible for our paid tiers, we need to keep those costs down as much as possible.

But that said, what specifically are you trying to trigger when the inventory item expires? Given that the player may not be online at that point, is it a notification? If so, we do provide a plugin for Unity that allows for delayed delivery of Push messages on Android (we'll be providing one for Apple devices in a future release).

Comment

People who like this

0 Show 5 · 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 Ian Oliver · Nov 11, 2016 at 11:47 PM 0
Share

From my standpoint, I don't need the realtime event just an event when the item is removed because of expiration...

A couple of scenarios:

- use the play stream to track conversion rates for special offers. Purchase vs. Expired.

- use the expiration of a special offer as a trigger for a followup special offer. eg: a lower price with more stuff

avatar image Brendan ♦♦ Ian Oliver · Nov 12, 2016 at 12:19 AM 0
Share

In that case, we'll be adding a player_inventory_item_removed (or something similar) in an upcoming release which should cover your use case. It'll trigger when an item is revoked or expires, as described above.

avatar image hoangkakadaylaptrinh · Nov 28, 2016 at 02:40 AM 0
Share

"When any action occurs which "touches" the player inventory (like a call to retrieve the inventory), there's a pass to check the expiration times for consumables, and any which have expired since the last time the inventory was touched are removed."

I don't need to do this realtime, I just want to have my cloud script or whatever mechanism that PlayFab provides to process custom logic when an item expired on the server.

For my case, I do upgrading skills of character by purchasing upgrade item, when this special item expired, character's skill get increased.

Does this make scene to do skills upgrading this way? any suggestions are welcome.

Thanks.

avatar image Brendan ♦♦ hoangkakadaylaptrinh · Nov 28, 2016 at 04:51 AM 1
Share

As stated above, if you're okay with the event occurring when the inventory is next updated (which could be days after the item's actual expiration date, if they player didn't sign in for that long), then the player_inventory_item_removed event we'll be adding will work for you.

As to whether that's the right way to do upgrades for skills, it depends upon the specifics. What are all the ways player can get that item - purchasing? Grants? Some combination? One thing to consider is, what's the maximum number of these items you'll be letting the player have, and is there any way to get many of them before some expire (given that they won't be stacked, but distinct)? For example, since you said "purchasing", would it be possibel for a player to stockpile VC and then purchase 100 of them in a row? Might the player exceed his inventory limit in that case?

avatar image hoangkakadaylaptrinh Brendan ♦♦ · Nov 28, 2016 at 06:46 AM 0
Share

Yes, that make sense.

For now, I restrict user to have 1 upgrading item in each character's inventory at a time, user can only buy another upgrading item after the current one finished or skipped

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

    How to revoke player inventory item from the console and automatically update the player data 1 Answer

    Passing custom data in player_inventory_item_added event 1 Answer

    Duplicated Event Problem 2 Answers

    PlayStream Event Action doesn't work 1 Answer

    Item expiration and events 1 Answer

    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