public sealed class ProductEventDetail : IMessage<ProductEventDetail>, IEquatable<ProductEventDetail>, IDeepCloneable<ProductEventDetail>, IBufferMessage, IMessage
Reference documentation and code samples for the Recommendations AI v1beta1 API class ProductEventDetail.
ProductEventDetail captures user event information specific to retail
products.
Required for add-to-list and remove-from-list events. The id or name of
the list that the item is being added to or removed from. Other event types
should not set this field.
public RepeatedField<CatalogItem.Types.CategoryHierarchy> PageCategories { get; }
Required for category-page-view events. Other event types should not set
this field.
The categories associated with a category page.
Category pages include special pages such as sales or promotions. For
instance, a special sale page may have the category hierarchy:
categories : ["Sales", "2017 Black Friday Deals"].
public PurchaseTransaction PurchaseTransaction { get; set; }
Optional. A transaction represents the entire purchase transaction.
Required for purchase-complete events. Optional for checkout-start
events. Other event types should not set this field.
[[["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\u003eProductEventDetail\u003c/code\u003e class captures user event data specific to retail products within the Recommendations AI v1beta1 API.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, facilitating various functionalities like message handling and cloning.\u003c/p\u003e\n"],["\u003cp\u003eKey properties include \u003ccode\u003eCartId\u003c/code\u003e, \u003ccode\u003eListId\u003c/code\u003e, \u003ccode\u003ePageCategories\u003c/code\u003e, \u003ccode\u003eProductDetails\u003c/code\u003e, \u003ccode\u003ePurchaseTransaction\u003c/code\u003e, and \u003ccode\u003eSearchQuery\u003c/code\u003e, which capture details about shopping carts, lists, page categories, product interactions, transactions, and search queries respectively, depending on the event type.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eProductEventDetail\u003c/code\u003e class has two constructors, one with no parameters and one that takes another \u003ccode\u003eProductEventDetail\u003c/code\u003e as a parameter, allowing for the creation of new instances.\u003c/p\u003e\n"],["\u003cp\u003eThe class has multiple properties with optional or required fields depending on the different event types, which are meant to capture key retail user event data.\u003c/p\u003e\n"]]],[],null,["# Recommendations AI v1beta1 API - Class ProductEventDetail (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.ProductEventDetail)\n- [2.0.0-beta05](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/2.0.0-beta05/Google.Cloud.RecommendationEngine.V1Beta1.ProductEventDetail)\n- [1.0.0-beta03](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/1.0.0-beta03/Google.Cloud.RecommendationEngine.V1Beta1.ProductEventDetail) \n\n public sealed class ProductEventDetail : IMessage\u003cProductEventDetail\u003e, IEquatable\u003cProductEventDetail\u003e, IDeepCloneable\u003cProductEventDetail\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Recommendations AI v1beta1 API class ProductEventDetail.\n\nProductEventDetail captures user event information specific to retail\nproducts. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ProductEventDetail \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ProductEventDetail](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductEventDetail), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ProductEventDetail](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductEventDetail), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ProductEventDetail](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.ProductEventDetail), [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### ProductEventDetail()\n\n public ProductEventDetail()\n\n### ProductEventDetail(ProductEventDetail)\n\n public ProductEventDetail(ProductEventDetail other)\n\nProperties\n----------\n\n### CartId\n\n public string CartId { get; set; }\n\nOptional. The id or name of the associated shopping cart. This id is used\nto associate multiple items added or present in the cart before purchase.\n\nThis can only be set for `add-to-cart`, `remove-from-cart`,\n`checkout-start`, `purchase-complete`, or `shopping-cart-page-view` events.\n\n### ListId\n\n public string ListId { get; set; }\n\nRequired for `add-to-list` and `remove-from-list` events. The id or name of\nthe list that the item is being added to or removed from. Other event types\nshould not set this field.\n\n### PageCategories\n\n public RepeatedField\u003cCatalogItem.Types.CategoryHierarchy\u003e PageCategories { get; }\n\nRequired for `category-page-view` events. Other event types should not set\nthis field.\nThe categories associated with a category page.\nCategory pages include special pages such as sales or promotions. For\ninstance, a special sale page may have the category hierarchy:\ncategories : \\[\"Sales\", \"2017 Black Friday Deals\"\\].\n\n### ProductDetails\n\n public RepeatedField\u003cProductDetail\u003e ProductDetails { get; }\n\nThe main product details related to the event.\n\nThis field is required for the following event types:\n\n- `add-to-cart`\n- `add-to-list`\n- `checkout-start`\n- `detail-page-view`\n- `purchase-complete`\n- `refund`\n- `remove-from-cart`\n- `remove-from-list`\n\nThis field is optional for the following event types:\n\n- `page-visit`\n- `shopping-cart-page-view` - note that 'product_details' should be set for this unless the shopping cart is empty.\n\nThis field is not allowed for the following event types:\n\n- `category-page-view`\n- `home-page-view`\n- `search`\n\n### PurchaseTransaction\n\n public PurchaseTransaction PurchaseTransaction { get; set; }\n\nOptional. A transaction represents the entire purchase transaction.\nRequired for `purchase-complete` events. Optional for `checkout-start`\nevents. Other event types should not set this field.\n\n### SearchQuery\n\n public string SearchQuery { get; set; }\n\nRequired for `search` events. Other event types should not set this field.\nThe user's search query as UTF-8 encoded text with a length limit of 5 KiB."]]