question

Adarsh Nambiar avatar image
Adarsh Nambiar asked

In game Vouchers

I am currently working on a Unity Game and I need the following functionality:-

When a player wins a random Prize ,this prize can be either added to the players voucher menu in the game or player can share this voucher to friend via facebook or email.

How do I configure each prize's voucher in the game ? is there a seperate system in PlayFab to handle this?

 

Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Yes, you would use the Trading system for this (https://api.playfab.com/Documentation/Client#Trading). Basically, you would set up a trade in PlayFab, and then send the other player the Trade ID. If you want to send this via a link in a post to Facebook or an email, you would need to have a deeplink system for your game, so that when it starts up, you use the link info to determine what to do. Alternately, you could store the link in a Shared Group Data with an ID of something like "{ {PlayFabID}}_Incoming", where { {PlayFabID}} is the recipient's PlayFab ID. There, you could write the trade info with a Key/Value of { {PlayFabID}}/{ {TradeID}}, where the PlayFab ID in this case would be the one for the player sending the voucher. Then, you could just send a "your friend has sent you a voucher" email/post, without the need for a deeplink.

And to be clear, the vouchers themselves would simply be items in your game's catalog.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Adarsh Nambiar avatar image
Adarsh Nambiar answered

Thank you very much .I will try this out and get back to you in case of any problems

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jason Corbett avatar image
Jason Corbett answered

This question is actually associated with a matter we've talked about inI think this might be a possible solution foprivate sorry, about a system for item scarcity, since these vouchers are for real world goods. In tandem with a deep linking system this might be a viable solution for sharing the individual item, but we're still working with other issues in our voucher system, including item scarcity and voucher data that we've put on the back burner while working on other aspects of our app. 

Items do not have local custom data that can be passed along in the trade, just global custom data attributes for the catalog?  We're also working on how to attach real world coupon codes to these catalog items, I'm thinking using player data keys associated with the itemid might work?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jason Corbett avatar image
Jason Corbett answered
Avatar

Oops, had an error while copying and pasting there.

This question is actually associated with a matter we've talked about in private support conversations, about a system for item scarcity, since these vouchers are for real world goods. In tandem with a deep linking system this might be a viable solution for sharing the individual item, but we're still working with other issues in our voucher system, including item scarcity and voucher data that we've put on the back burner while working on other aspects of our app. 

Items do not have local custom data that can be passed along in the trade, just global custom data attributes for the catalog?  We're also working on how to attach real world coupon codes to these catalog items, I'm thinking using player data keys associated with the itemid might work?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

It sounds like there are two different topics here, so let me tease them apart:

First, all Custom Data which has been set on an inventory item instance will still be there on the item when it has been traded to another player - the item will be exactly as it was in the original owner's inventory.

Second, yes, scarcity is not natively supported in PlayFab yet, so I wouldn't recommend trying to build a system which depends upon using any form of User or Custom Data to manage scarcity - particularly as there's no single data Key that all players could write to (Shared Group Data is intended for subsets of users and shouldn't be used for data that all users in the game read or write). But that said, yes, you could put real-world coupon code info on the CustomData for an inventory item instance.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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.