Optional. Quantity of the products in stock when a user event happens.
Optional. If provided, this overrides the available quantity in Catalog for
this event. and can only be set if stock_status is set to IN_STOCK.
Note that if an item is out of stock, you must set the stock_state field
to be OUT_OF_STOCK. Leaving this field unspecified / as zero is not
sufficient to mark the item out of stock.
Optional. Quantity of the product associated with the user event. For
example, this field will be 2 if two products are added to the shopping
cart for add-to-cart event. Required for add-to-cart, add-to-list,
remove-from-cart, checkout-start, purchase-complete, refund event
types.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eProductDetail\u003c/code\u003e class in the Recommendations AI v1beta1 API provides detailed product information associated with user events.\u003c/p\u003e\n"],["\u003cp\u003eIt offers properties to manage product details, including \u003ccode\u003eId\u003c/code\u003e, \u003ccode\u003eDisplayPrice\u003c/code\u003e, \u003ccode\u003eOriginalPrice\u003c/code\u003e, \u003ccode\u003eCurrencyCode\u003c/code\u003e, \u003ccode\u003eQuantity\u003c/code\u003e, \u003ccode\u003eAvailableQuantity\u003c/code\u003e, \u003ccode\u003eStockState\u003c/code\u003e, and \u003ccode\u003eItemAttributes\u003c/code\u003e, which are used to provide context for user interactions.\u003c/p\u003e\n"],["\u003cp\u003eThis class includes optional features like overriding catalog information with event-specific data and handling product stock status, enhancing the accuracy of event tracking.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements multiple interfaces including IMessage, IEquatable, IDeepCloneable, and IBufferMessage, demonstrating its broad integration capabilities within the .NET environment.\u003c/p\u003e\n"],["\u003cp\u003eThe class is located in the namespace Google.Cloud.RecommendationEngine.V1Beta1 within the Google.Cloud.RecommendationEngine.V1Beta1.dll assembly, and currently has 3 versions available, with 2.0.0-beta06 being the latest.\u003c/p\u003e\n"]]],[],null,["# Recommendations AI v1beta1 API - Class ProductDetail (2.0.0-beta06)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-beta06 (latest)](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail)\n- [2.0.0-beta05](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/2.0.0-beta05/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail)\n- [1.0.0-beta03](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/1.0.0-beta03/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail) \n\n public sealed class ProductDetail : IMessage\u003cProductDetail\u003e, IEquatable\u003cProductDetail\u003e, IDeepCloneable\u003cProductDetail\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Recommendations AI v1beta1 API class ProductDetail.\n\nDetailed product information associated with a user event. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ProductDetail \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ProductDetail](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ProductDetail](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ProductDetail](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductDetail), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.RecommendationEngine.V1Beta1](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.RecommendationEngine.V1Beta1.dll\n\nConstructors\n------------\n\n### ProductDetail()\n\n public ProductDetail()\n\n### ProductDetail(ProductDetail)\n\n public ProductDetail(ProductDetail other)\n\nProperties\n----------\n\n### AvailableQuantity\n\n public int AvailableQuantity { get; set; }\n\nOptional. Quantity of the products in stock when a user event happens.\nOptional. If provided, this overrides the available quantity in Catalog for\nthis event. and can only be set if `stock_status` is set to `IN_STOCK`.\n\nNote that if an item is out of stock, you must set the `stock_state` field\nto be `OUT_OF_STOCK`. Leaving this field unspecified / as zero is not\nsufficient to mark the item out of stock.\n\n### CurrencyCode\n\n public string CurrencyCode { get; set; }\n\nOptional. Currency code for price/costs. Use three-character ISO-4217\ncode. Required only if originalPrice or displayPrice is set.\n\n### DisplayPrice\n\n public float DisplayPrice { get; set; }\n\nOptional. Display price of the product (e.g. discounted price). If\nprovided, this will override the display price in Catalog for this product.\n\n### Id\n\n public string Id { get; set; }\n\nRequired. Catalog item ID. UTF-8 encoded string with a length limit of 128\ncharacters.\n\n### ItemAttributes\n\n public FeatureMap ItemAttributes { get; set; }\n\nOptional. Extra features associated with a product in the user event.\n\n### OriginalPrice\n\n public float OriginalPrice { get; set; }\n\nOptional. Original price of the product. If provided, this will override\nthe original price in Catalog for this product.\n\n### Quantity\n\n public int Quantity { get; set; }\n\nOptional. Quantity of the product associated with the user event. For\nexample, this field will be 2 if two products are added to the shopping\ncart for `add-to-cart` event. Required for `add-to-cart`, `add-to-list`,\n`remove-from-cart`, `checkout-start`, `purchase-complete`, `refund` event\ntypes.\n\n### StockState\n\n public ProductCatalogItem.Types.StockState StockState { get; set; }\n\nOptional. Item stock state. If provided, this overrides the stock state\nin Catalog for items in this event."]]