Module: Peddler::Reports::SellingPartnerSearchTerms

Defined in:
lib/peddler/reports/selling_partner_search_terms.rb,
lib/peddler/reports/selling_partner_search_terms/report.rb,
lib/peddler/reports/selling_partner_search_terms/report_options.rb,
lib/peddler/reports/selling_partner_search_terms/report_specification.rb,
lib/peddler/reports/selling_partner_search_terms/details_by_department_and_search_term.rb

Overview

The Search Terms report shares data on the top-3 clicked ASINs by search keyword and department for a marketplace. Data is available at different date range aggregation levels: DAY, WEEK, MONTH, QUARTER. Requests cannot span multiple periods. For example, a request at WEEK level could not start on 2021-06-06 and end on 2021-06-19 as this would span two weeks.

Constant Summary collapse

Report =

The Search Terms report shares data on the top-3 clicked ASINs by search keyword and department for a marketplace. Data is available at different date range aggregation levels: DAY, WEEK, MONTH, QUARTER. Requests cannot span multiple periods. For example, a request at WEEK level could not start on 2021-06-06 and end on 2021-06-19 as this would span two weeks.

Structure.new do
  # @return [Array<DetailsByDepartmentAndSearchTerm>]
  attribute(:data_by_department_and_search_term, [DetailsByDepartmentAndSearchTerm], from: "dataByDepartmentAndSearchTerm")

  # @return [Hash] Summarizes the original report request.
  attribute(:report_specification, ReportSpecification, from: "reportSpecification")
end
ReportOptions =

Report options specifying parameters such as reportPeriod.

Structure.new do
  # @return [String] Determines what granularity of data is expected in the report. Valid values are: DAY, WEEK,
  # MONTH, QUARTER.
  attribute(:report_period, String, from: "reportPeriod")
end
ReportSpecification =

Summarizes the original report request.

Structure.new do
  # @return [Date] Determines the end date of the report - the time component is ignored. For WEEK, MONTH and
  # QUARTER reportPeriods, this value must correspond to the last day in the specified reportPeriod. For example,
  # dataEndTime must be a Saturday for the WEEK reportPeriod.
  attribute(:data_end_time, Date, from: "dataEndTime")

  # @return [Date] Determines the start date of the report - the time component is ignored. For WEEK, MONTH and
  # QUARTER reportPeriods, this value must correspond to the first day in the specified reportPeriod. For example,
  # dataStartTime must be a Sunday for the WEEK reportPeriod.
  attribute(:data_start_time, Date, from: "dataStartTime")

  # @return [Array<String>] This parameter must match the marketplaceId of the selling partner account. Each
  # selling partner account belongs to one marketplaceId.
  attribute(:marketplace_ids, [String], from: "marketplaceIds")

  # @return [ReportOptions] Report options specifying parameters such as reportPeriod.
  attribute(:report_options, ReportOptions, from: "reportOptions")

  # @return [String] The report type.
  attribute(:report_type, String, from: "reportType")
end
DetailsByDepartmentAndSearchTerm =

Contains search term analytics by department name and search term.

Structure.new do
  # @return [Float] The fraction of clicks that the product received compared to the total clicks for the
  # searchTerm within the departmentName for the specified reportPeriod. Multiply the value by 100 to represent as
  # a percentage.
  attribute(:click_share, Float, from: "clickShare")

  # @return [Integer] The relative ranking of the clickedAsin based on clickShare.
  attribute(:click_share_rank, Integer, from: "clickShareRank")

  # @return [String] The Amazon Standard Identification Number of a product that the customer clicked on after
  # using the searchTerm within a departmentName.
  attribute(:clicked_asin, String, from: "clickedAsin")

  # @return [Float] The fraction of conversions that the product achieved in comparison to the total conversions
  # that resulted from the departmentName and searchTerm in the respective reportPeriod. For example, if overall
  # conversions for searchTerm=batteries was 98, and the conversions for clickedAsin were 13, conversionShare
  # would be 13/98=0.1327. Multiply by 100 to express as a percentage.
  attribute(:conversion_share, Float, from: "conversionShare")

  # @return [String] The name of the Amazon search department the searchTerm was searched within. For example,
  # customers may search across all of Amazon.com or within the Beauty department within Amazon.com.
  attribute(:department_name, String, from: "departmentName")

  # @return [Integer] The relative ranking of the searchTerm within a departmentName based on frequency of
  # searches for the specified reportPeriod.
  attribute(:search_frequency_rank, Integer, from: "searchFrequencyRank")

  # @return [String] The term the customer used when searching for products.
  attribute(:search_term, String, from: "searchTerm")
end

Class Method Summary collapse

Class Method Details

.parse(hash) ⇒ Object



15
16
17
# File 'lib/peddler/reports/selling_partner_search_terms.rb', line 15

def parse(hash)
  Report.parse(hash)
end