question

dec-8479waga avatar image
dec-8479waga asked

I feel there's no way registering the Store price of an item properly

I want to create the Catalog V2 Store. I feel there's no way registering the Store price of an item properly I filled the CreateDraftItemRequest fields like this.

             CreateDraftItemRequest CreateRequest = new CreateDraftItemRequest
             {
         Item = new PlayFab.EconomyModels.CatalogItem
               {
                 Type = "store",
         ...
                 ItemReferences = StoreItemsData
               },
               Publish = false
             };

I tried to register 2 Items in a Store. First one has 2 Prices, and second Price includes 2 Currencies. Counts of field's lists were surely like this.

StoreItemsData.Count = 2 StoreItemsData[0].PriceOptions.Prices.Count =2 StoreItemsData[0].PriceOptions.Prices[0].Amounts.Count =1 StoreItemsData[0].PriceOptions.Prices[1].Amounts.Count =2 StoreItemsData[1].PriceOptions.Prices.Count = 1 StoreItemsData[1].PriceOptions.Prices[0].Amounts.Count = 1

Though, as a result, first Item has 3 Prices and second one and third one was exactly same.

I changed "First one has 2 Prices, and second Price includes 2 Currencies." into "First one has 2 Prices, and second Price includes 3 Currencies." And Counts of field's lists were like this.

StoreItemsData.Count = 2 StoreItemsData[0].PriceOptions.Prices.Count =2 StoreItemsData[0].PriceOptions.Prices[0].Amounts.Count =1 StoreItemsData[0].PriceOptions.Prices[1].Amounts.Count =3 StoreItemsData[1].PriceOptions.Prices.Count = 1 StoreItemsData[1].PriceOptions.Prices[0].Amounts.Count = 1

The result is, first Item has 4 Prices and second ,third and forth one was exactly same.

Did I something wrong?

Sorry for my bad english.

apis
6 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.

Simon Cui avatar image Simon Cui commented ·

Sorry, I am confused by the question description. I suggest you use Game Manager to register items. You can navigate to [Your Game Manager] -> [Your title] -> [Economy] -> [Catalog(V2)] -> [New Item]. For more information, please refer to : Catalog v2 quickstart.

0 Likes 0 ·
dec-8479waga avatar image dec-8479waga commented ·

Fixed some codes those were difficult to view.


"First one has 2 Prices, and second Price includes 2 Currencies."

StoreItemsData.Count = 2

StoreItemsData[0].PriceOptions.Prices.Count =2 StoreItemsData[0].PriceOptions.Prices[0].Amounts.Count =1 StoreItemsData[0].PriceOptions.Prices[1].Amounts.Count =2

StoreItemsData[1].PriceOptions.Prices.Count = 1 StoreItemsData[1].PriceOptions.Prices[0].Amounts.Count = 1


"First one has 2 Prices, and second Price includes 3 Currencies."

StoreItemsData.Count = 2

StoreItemsData[0].PriceOptions.Prices.Count =2 StoreItemsData[0].PriceOptions.Prices[0].Amounts.Count =1 StoreItemsData[0].PriceOptions.Prices[1].Amounts.Count =3

StoreItemsData[1].PriceOptions.Prices.Count = 1 StoreItemsData[1].PriceOptions.Prices[0].Amounts.Count = 1

0 Likes 0 ·
dec-8479waga avatar image dec-8479waga commented ·

I did additional researches.

I tried to register,
"There's 2 Items in a Store. First Item has 3 Prices, first Price includes single Currency, second Price includes 3 Currencies, and third Price includes single Currency. "

And Counts of field's lists were like this.


StoreItemsData.Count = 2

StoreItemsData[0].PriceOptions.Prices.Count =3

StoreItemsData[0].PriceOptions.Prices[0].Amounts.Count =1
StoreItemsData[0].PriceOptions.Prices[1].Amounts.Count =3
StoreItemsData[0].PriceOptions.Prices[2].Amounts.Count =1

StoreItemsData[1].PriceOptions.Prices.Count = 1

StoreItemsData[1].PriceOptions.Prices[0].Amounts.Count = 1


The result is, in first Item Data,

StoreItemsData[0].PriceOptions.Prices[0].Amounts.Count =1
resistered as Price1,

StoreItemsData[0].PriceOptions.Prices[1].Amounts.Count =3
resistered as Price2, Price3, and Price4, all of those includes 3 Currencies and exactly same,

StoreItemsData[0].PriceOptions.Prices[2].Amounts.Count =1
resistered as Price5.

I feel I can't resister Prices properly using CreateDraftItemRequest.

0 Likes 0 ·
dec-8479waga avatar image dec-8479waga commented ·

I'm sorry, i'm not used to writing like this things
What I'm considering is, registering Item Store from CSV data.

And my thinking, in CreateDraftItemRequest class,

・if "( ItemReferences[] ).Count = 2",
it will be 2 Items are registered in a Store,

・and if "( ItemReferences[0].PriceOptions.Prices[] ).Count = 2",
2 Prices of first Item will be registered.

・and if "( ItemReferences[0].PriceOptions.Prices[0].Amounts[] ).Count = 3",
3 Currencies will be registered as a Price1.

Though actually,
・if "( ItemReferences[0].PriceOptions.Prices[0].Amounts[] ).Count = 3",
something like
・|CoinA:50, Gold:100,Shilver:20| is registered as not only Price1,but also Price2 and Price3.

So, it's like not only (n) Currencies are registered as a Price, the operation repeated (n) times.

I don't need to register (n) Currencies as Price( i ~ i+(n-1) ).

I kinda feel like

・|A:50, B:100,C:20|is registered Price(i) ,mainly A
・|A:50, B:100,C:20|is registered Price( i+1 ) ,mainly B
・|A:50, B:100,C:20|is registered Price(i+2) ,mainly C

There's unnecessary repetition

0 Likes 0 ·
Simon Cui avatar image Simon Cui dec-8479waga commented ·

Hello. I suggest you manually register Currency in Catalog(V2) using Game Manager at first. Then you can register those items. At last, you can manage your Store in Game Manager.

0 Likes 0 ·
Simon Cui avatar image Simon Cui dec-8479waga commented ·

You may refer to this screenshot: 5470-register.png

0 Likes 0 ·
register.png (48.1 KiB)
Derek Reese avatar image
Derek Reese answered

@dec-8479waga we have confirmed the bug and made code updates. Thanks for clearly pointing out the scenario, it made it that much easier to identify and fix. We appreciate you!

You should be able to continue with setting your prices in CreateDraftItemRequest as you explained it. Please let us know here if you continue to run into difficulties with this specific process.

10 |1200

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

kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

Thanks for bringing this to our attention. It looks like there's a bug related to prices. I'll take a look and see if we can figure out what's going on.

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.