What is a ProductId in this context?

I am using AvatarEditorService and :SearchCatalog() in order to get a list of shirts and pants that a group has, in order to make an in-game shop.

However, the data returned from the CataloguePages object is as follows:

type AssetData = {
	Id: number, --the asset ID
	ItemType: string,
	AssetType: 'Shirt' | 'Pants',
	BundleType: string,
	Name: string,
	Description: string,
	ProductId: number, --???
	..., --some other stuff
}

Now, what I actually wanted is the ID of the asset, and at first I used the ProductId number (and it didn’t work, Id was the actual asset id i was looking for), But it got me extremely curious, what is this value used for? (and theres actually a value, it isn’t nil)

The reason I’m curious is because this value would never be used, even in the context of purchasing the asset, as for that you can just use the Id value in

game:GetService('MarketPlaceService'):PromptPurchase(player,assetId)

Would this mean you could purchase it with :PromptProductPurchase()?, and so process it with a .ProcessReceipt?

1 Like

Bump, was genuinely curious what ProductId meant too but can’t anything on the wiki or devforum about it

1 Like

Product ID’s are most often used when handling Developer products. In other cases, it can be used to get additional information about a Developer product, asset, gamepass, etc. such as their image.

This is gotten using MarketplaceService:GetProductInfo(productId, Enum.InfoType). The InfoType enum specifies if the product being searched is an asset, Developer product, gamepass, and so on.

In short, with purchasing it’s typically used to prompt a product purchase (for Developer products), otherwise it’s mostly used for getting info about an asset or product. There may be other use-cases for it, but none that immediately come to mind. Hope this helps! :slight_smile:

Thanks for your reply Jeebus, however that’s the exact issue. The ProductId (to retrieve asset details, get images, prompt purchases, etc) you’re referring to is indexed as AssetData.Id.

Meanwhile AssetData.ProductId is a completely different number which doesn’t have any functional purpose as far as I can find.

I think the naming of these two properties adds to the confusion since as you mentioned ProductId is often used to refer to the Id of developer products, etc.

2 Likes

Anyone have an update on this? The roblox wiki has this info on this page:External Catalog Queries | Documentation - Roblox Creator Hub

Apparently restless souls bandana’s product id is not the same as its id on the catalog.

{
	"keyword": null,
	"previousPageCursor": null,
	"nextPageCursor": "2_1_c541d05046b5c1c78a5d386b5e302243",
	"data": [
    {
        "id":527373900,
        "itemType":
        "Asset",
        "assetType":42,
        "name":"Restless Souls Bandana",
        "description":"This bandana won't help you blend in with ghosts, but at least you'll be stylish.",
        "productId":41270974,
        "genres":[
          "Scary",
          "Adventure"
          ],
        "itemStatus":[],
        "itemRestrictions":[],
        "creatorType":"User",
        "creatorTargetId":1,
        "creatorName":"Roblox",
        "price":300,
        "favoriteCount":15943,
        "offSaleDeadline":null
        }
	]
}
1 Like