question

mike avatar image
mike asked

Ability to filter and sort using GetCatalogItems?

With the client API, is there a way to ask for just a subset of the catalog? For instance, I'd like to show only catalog items with a certain ItemClass on a screen in the game (in order to allow the player to purchase them). Another way to filter would be by Tag.

As a side note: since catalog items are returned in an array, it would be nice to sort them in the request.

As a practical example in Unity for instance, I'd imagine something like this:

GetCatalogItemsRequest request = new GetCatalogItemsRequest() { 
    CatalogVersion = "1.0",
    ItemClassFilter = "Weapons",
    SortByVirtualCurrency = "GD"
};

This would return ONLY catalog items where ItemClass is "Weapons" and it would sort the items array by virtual currency costs.

1 comment
10 |1200

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

Quyet Doan avatar image Quyet Doan commented ·

hello @Brendan, do we have filter feature in this version?
thank you,

,

hello @Brendan, do we have filter feature in this version update?

0 Likes 0 ·
brendan avatar image
brendan answered

The GetCatalogItems call only takes the CatalogVersion as input, currently. We'll add more filtering options in a future update, but one thing you could do right now would be to create multiple Stores for different combinations of items you want to query (a Store is simply a subset of items from your catalog, optionally with distinct pricing).

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

mike avatar image mike commented ·

Ah. That's really helpful actually. Thanks.

0 Likes 0 ·
Christopher Clogg avatar image Christopher Clogg commented ·

Not sure if filtering is still on the table (would be great in both catalog and getting players inventory), but +1 from me for that as a feature request!

0 Likes 0 ·
Andy avatar image Andy ♦♦ Christopher Clogg commented ·

It's definitely coming. I don't have a firm timeline yet, but it's currently part of the UGC private preview.

1 Like 1 ·
Christopher Clogg avatar image Christopher Clogg Andy ♦♦ commented ·

Wow that's great to hear! Looking forward to it.

0 Likes 0 ·
Show more comments
Zhi Kang Shao avatar image
Zhi Kang Shao answered

Just wanted to express my interest in this feature. This is more than quality of life: having to retrieve the full catalog (1000 items) while we would like to just retrieve like 30 items (by class) or 1 item (by item id) is the main driver of our monthly PlayFab costs.

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.