We are using playstream and cloudscript when we grant an item to a player from the console using player_inventory_item_added and a custom cloudscript. This let's us grant a player an item from the console and automatically updates that player's data to reflect the change.
Looking through the default options for playstream events we didn't see any option for revoking (ie player_inventory_item_removed) similar to granting an item. We would like to revoke the item in the console and set up a playstream event and cloudscript that automatically updates the player data.
We found player_item_consumed but this wasn't triggerable when we revoke an item in the console and doesn't reflect the use case for a durable item.
What is the best way to achieve this?
Answer by Brendan · Nov 07, 2017 at 12:34 AM
Correct, as we mentioned in this thread (https://community.playfab.com/questions/7391/revoke-item-event.html), we have a backlog item for an "item revoked" event, but there isn't one in the service currently. Since item revocation can only be done via a targeted API call or through the Game Manager though, right now you could simply have the process be to do both steps - revoke the item, then update the data. The simplest would be to do this via a script that does both API calls for you, using the Server API.