question

brendan avatar image
brendan asked

Automatic catalog creation/upload

Question from a developer:

It is possible to import a file with all the catalog data into PlayFab? Like a CSV or an Excel Spreadsheet?

In-Game Economy
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! In fact, one of the developers using PlayFab - Rich Joslin - created a tool that allows you to import data directly, using Google Sheets. You can access it in Rich's GitHub, here:

https://github.com/richjoslin/GoogleSheetsToPlayFab

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

Adam Sauer avatar image Adam Sauer commented ·

Hey Brendan,

It appears that Google Sheets link doesn't work anymore. Is importing from Google Sheets still a capability?

Thanks,
Adam

0 Likes 0 ·
brendan avatar image brendan Adam Sauer commented ·

Since it's really Rich's work, I've updated the pointer to his GitHub repo for this.

0 Likes 0 ·
me-3 avatar image me-3 brendan commented ·

It seems the code used for this is depreciated, is there any alternatives for this?

0 Likes 0 ·
Show more comments
Jonathon Mckay avatar image
Jonathon Mckay answered

Hey Brendan,

Thank you for the info, the tool is very simple and super useful (I've already expanded it with what I needed).

One question: it is possible to upload the json file to just add new items instead that completely overwrite all?

Thx

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

Well, the "upload JSON" is really intended for the workflow of downloading the catalog and editing it for re-upload, but you can also use UpdateCatalogItems. That API adds the items submitted to the catalog in question. For convenience, you could use it via Postman using our Collection from GitHub.

And, of course, you can quickly add items to the catalog by duplicating other items in the catalog using the Game Manager, then modifying the elements you need to for the specific item you're adding.

If you feel an "Upload JSON Additive" would be a useful option in the Game Manager, feel free to add it to the Feature Requests forum, so that others can vote on how useful it would be to them - voting there helps us be aware of which things we've heard about would be of benefit to the largest percentage of our community! :)

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 answered

Just a comment on this: If you upload a JSON document that isn't formatted the same as the catalog, then nothing happens. No error message or anything. There should be some information like in Brendan's post above that mentions the intended workflow.

For me, I assumed "Upload JSON" would replace the catalog entirely, which is also different from Brendan's suggestion of an "Upload JSON Additive". I think there are use cases for all 3 of these methods.

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.

brendan avatar image brendan commented ·

Thanks - I'll open a bug on that behavior in the Game Manager.

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.