question

Martin Sten avatar image
Martin Sten asked

Calling SetStoreItems from the Admin API causes problems

Hi!

I was experimenting with the SetStoreItems call in the Admin API, which made all previous stores invisible in the catalog. The stores are still there since I can access them from the game, but an error is causing them to not show up in the developer portal.

Title ID: 74D5

SDK version: 2.66.190509

Here's what happens when I reload the page

When calling the SetStoreItems function I used a new StoreId, the store did not exist beforehand. Here's the code I used:

UpdateStoreItemsRequest setStoreItemsRequest = new 
{
	CatalogVersion = "6",
	Store = new List<StoreItem> { new StoreItem() { ItemId = "ak" }, },
	StoreId = "items_daily"
};


PlayFabAdminAPI.SetStoreItems(setStoreItemsRequest, (success) => 
{
	AdminLog.instance.AddLogMessage("SetStoreItems Success");
},
(error) => 
{
	AdminLog.instance.AddLogMessage("SetStoreItems Error " + error.ErrorMessage);
});

The call completes without errors, so I'm not sure what went wrong, I would appreciate it if you looked into it!

playfab01.png (59.2 KiB)
playfab02.png (48.3 KiB)
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

·
Martin Sten avatar image
Martin Sten answered

I figured out a solution, I used the DeleteStore function from the Admin API to delete the newly created store, this made the rest of the stores once again show up in the developer portal.

The issue seems to have been that I didn't specify a price in the SetStoreItems call, but the field isn't marked as required. I would suggest making the call fail if no price is specified :)

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

Citrus Yan avatar image Citrus Yan commented ·

Hey, we’ve reproduced your situation and believe this may be an issue, we’ll discuss about it with our product team later, thanks for your feedback:)

0 Likes 0 ·
franklinchen avatar image franklinchen commented ·

Hi @Martin Sten, the issue that Calling SetStoreItems without price specified from the Admin API causes Game Manager to malfunction has been fixed. Please let us know if you still see any issues. Thanks.

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.