class Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductEventDetail
ProductEventDetail captures user event information specific to retail products.
Attributes
Optional. The id or name of the associated shopping cart. This id is used to associate multiple items added or present in the cart before purchase. This can only be set for `add-to-cart`, `remove-from-cart`, `checkout-start`, ` purchase-complete`, or `shopping-cart-page-view` events. Corresponds to the JSON property `cartId` @return [String]
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. Corresponds to the JSON property `listId` @return [String]
Required for `category-page-view` events. At least one of search_query
or page_categories
is required for `search` 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”]. Corresponds to the JSON property `pageCategories` @return [Array<Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy>]
The main product details related to the event. This field is required for the following event types: * `add-to-cart` * `add-to-list` * `checkout-start` * ` detail-page-view` * `purchase-complete` * `refund` * `remove-from-cart` * ` remove-from-list` This field is optional for the following event types: * ` page-visit` * `shopping-cart-page-view` - note that 'product_details' should be set for this unless the shopping cart is empty. * `search` (highly encouraged) In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished broswing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new SEARCH event with different product_details
is desired. The end user may have not finished broswing the whole page yet. This field is not allowed for the following event types: * `category-page-view` * `home-page-view` Corresponds to the JSON property `productDetails` @return [Array<Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductDetail>]
A transaction represents the entire purchase transaction. Corresponds to the JSON property `purchaseTransaction` @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1PurchaseTransaction]
At least one of search_query
or page_categories
is required for `search` events. Other event types should not set this field. The user's search query as UTF-8 encoded text with a length limit of 5 KiB. Corresponds to the JSON property `searchQuery` @return [String]
Public Class Methods
# File lib/google/apis/recommendationengine_v1beta1/classes.rb, line 1416 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File lib/google/apis/recommendationengine_v1beta1/classes.rb, line 1421 def update!(**args) @cart_id = args[:cart_id] if args.key?(:cart_id) @list_id = args[:list_id] if args.key?(:list_id) @page_categories = args[:page_categories] if args.key?(:page_categories) @product_details = args[:product_details] if args.key?(:product_details) @purchase_transaction = args[:purchase_transaction] if args.key?(:purchase_transaction) @search_query = args[:search_query] if args.key?(:search_query) end