Idea

Ian Oliver avatar image
Ian Oliver suggested

Improve GrantItemsToUsers to support item grants from multiple catalogs in a single call

Currently GrantItemsToUsers allows you to grant items from only a single catalog. This is owing to the catalog version being specified separately from the items granted.

It would be great if it was possible to add an optional parameter on the item grants for CatalogVersion. If no catalog is specified, it can use the original CatalogVersion parameter value.

This would be useful to us to reduce the number of calls to GrantItemsForUsers from our cloud script (especially important for actions which are, by default, very limited in call counts).

apisCloudScript
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 Comment

·
brendan avatar image
brendan commented

The design of the catalog system is that you have one catalog for the game, which you iterate on as you update it - hence, the reason it's "CatalogVersion", rather than "CatalogId". Some operations - notably receipt validation - only work with the Primary catalog, in fact. In general, we recommend using that design pattern, and subdivide the catalog items using Stores (which you can also then target by player segment).

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.

Ian Oliver avatar image Ian Oliver commented ·

If that is the case, it seems like PlayFab may want to update/correct their recipes. Specifically:

All of which explicitly recommends the creation of a separate and distinct catalogs for various purposes separate from the default purchase catalogs.

We have followed this example and we handle special offers, rewards and special virtual currency purchases in separate catalogs. This is part organizational nicety, part efficiency (reducing default catalog bloat), and, apparently inline with the PlayFab recipes I sited above.

Guidance appreciated.

0 Likes 0 ·
brendan avatar image brendan Ian Oliver commented ·

Yes, that's absolutely the case - I have a bug open on the recipes to have them updated to reflect our best practices. Apologies for any confusion caused.

0 Likes 0 ·
marcos avatar image marcos Ian Oliver commented ·

Just chiming in to say that same as @Ian Oliver we are also using multiple catalogs to denote different types of item listings to great effect. The monotlithic approach to a single go-to inventory for any virtual item does not work well with our game, where different game contexts provide entirely different listings, for items, pictures, collectibles, emojis, etc.

So far has worked fine!


That being said, was very difficult for us to understand what was the official "best practice" in that regard.

0 Likes 0 ·

Write a Comment

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

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.