question

te la avatar image
te la asked

How to aggregate remaining virtual currency held by all users?

Hi,

Is there any way to aggregate all user's virtual currency?

Or can I see such values somewhere in GameManager?

In some countries, developers are required to regularly report to the government the amount of remaining virtual currency held by all users.

Thanks in advance.

dataanalytics
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

It is possible but may need additional work. When Virtual Currency is changed, PlayFab will generate “player_virtual_currency_balance_changed” PlayStream Event, and there is a property “VirtualCurrencyBalance” in the payload that stands for the latest VC value.

You may need to write a custom Kusto Query that will list all active players’ latest “player_virtual_currency_balance_changed” event during a specific time span, so that you can print out the VirtualCurrencyBalance value for each player.

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.

te la avatar image te la commented ·
@SethDu

Thank you for your reply.

I read the documents about PlayStream event.

I'm wondering if it's possible to keep the latest “player_virtual_currency_balance_changed” for one player forever.

For example, suppose a user purchases $100 worth of virtual currency on November 1, 2021, then she uninstalls the app.

I have to aggregate this $100 worth of virtual currency in 2022, 2023, ... and 2030 (as long as the app survives)

Is it possible?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ te la commented ·

It is not supported, but you are able to use Event Export feature to dump the event archives to external database. Both Azure Blob and AWS S3 are supported.

0 Likes 0 ·
te la avatar image te la Seth Du ♦ commented ·

Thank you! I'll look into Event Export.

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]