question

Martin Grigorov avatar image
Martin Grigorov asked

Is there a way to get the number of the revoked items in the player's inventory?

Hello,

We need the info of how much items the player has revoked(used) in his inventory but everything I've found says there is no way to get that info (which is available in the UserManager control panel in the website). Is there a way to get that info trough CloudScript call? Just to clarify we need that info for the current state of the players so adding a feature like a variable to store the info after future playstream event of granting/consuming an item is not suitable.

Thank you!

CloudScriptIn-Game EconomyPlayer Inventory
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

·
Seth Du avatar image
Seth Du answered

To be clear, Revoked and Consumed is not the same status. Consumed by time or count will create an Expired item log in the inventory and “Player consumed item” event will be generated in the PlayStream. While, Revoke usually is an administrative action, which won’t have any events.

Hence, to track down the Consumed item number, you may use Data Explorer to filter and count events. Otherwise, you may implement a Rule that is triggered by “Player consumed item” event and execute a Cloud Script/Azure Function to write data in Player Read-Only/Internal Data for future reference.

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

Martin Grigorov avatar image Martin Grigorov commented ·

Thank you for your answer! So in one word the number of consumed items is not publicly accessible and we cannot do anything to get that info for the consumed items until now? I get that we can manually track that info for all future consumptions. Unfortunately we needed the info for all old consumptions.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Martin Grigorov commented ·

There can be a workaround but it is complicated. Please refer to An error when Connecting Playfab Insights using Kusto C# SDK - Playfab Community. You may implement an Azure Function and install Kusto SDK so that players can query the number via executing functions. I suggest adding frequency limit and necessary verifications in the function.

0 Likes 0 ·
Martin Grigorov avatar image Martin Grigorov Seth Du ♦ commented ·

Thank you!

0 Likes 0 ·

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.