GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1ProductEventDetail (google_api_recommendation_engine v0.4.5) View Source

ProductEventDetail captures user event information specific to retail products.

Attributes

  • cartId (type: String.t, default: nil) - 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.
  • listId (type: String.t, default: nil) - 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.
  • pageCategories (type: list(GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy.t), default: nil) - 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"].
  • productDetails (type: list(GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1ProductDetail.t), default: nil) - 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
  • purchaseTransaction (type: GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1PurchaseTransaction.t, default: nil) - 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.
  • searchQuery (type: String.t, default: nil) - 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.

Link to this section Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Link to this section Types

Specs

t() ::
  %GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1ProductEventDetail{
    cartId: String.t() | nil,
    listId: String.t() | nil,
    pageCategories:
      [
        GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy.t()
      ]
      | nil,
    productDetails:
      [
        GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1ProductDetail.t()
      ]
      | nil,
    purchaseTransaction:
      GoogleApi.RecommendationEngine.V1beta1.Model.GoogleCloudRecommendationengineV1beta1PurchaseTransaction.t()
      | nil,
    searchQuery: String.t() | nil
  }

Link to this section Functions

Specs

decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.