Amazon Advertising API Plugin for Zuar Runner

Amazon Advertising API Plugin for Zuar Runner

Zuar's newly released Amazon Advertising API plugin (AAAPI) enables Zuar Runner to pipe data from a customer's Amazon Advertising account and store the data in a database. This is a brief high-level description of plugin's operation.

Learn more about Runner's Amazon Advertising API:

Amazon API: What is it?

From a data perspective, Amazon Advertising API enables users to develop flexible solutions for programmatically accessing data that is stored in the account. By accessing data through the API, you can build automated data pipelines to move, store, transform, analyze, and visualize Amazon Advertising data. Runner's plugin handles all the heavy lifting so you can get straight to the source and start making intelligence, data-driven decisions.

Amazon Advertising API Data

An Amazon Advertising account contains one or more profiles representing entities for which digital marketing campaigns are managed and monitored. Each profile is associated with a Profile ID which uniquely identifies the entity. Operations with the Amazon Advertising plugin are organized around these Profile IDs.

For each profile, a reports and snapshots are available via the Amazon Advertising API. Reports contain daily performance metrics and can be requested up to sixty days in the past. Snapshots contain information about the entities associated with the metrics at the time the snapshot was made.

Available Data

Once configured, the plugin allows Runner to collect all available data from the Amazon Advertising API.  The following data, reports, and snapshots can be obtained.

Account-Wide Data

The only account-wide data available via the Amazon API are the profiles being managed by the account.

Per-Profile Data

For each profile, reports and snapshots are available via the AAAPI. Reports contain daily performance metrics and can be requested up to sixty days in the past. Snapshots contain information about the entities associated with the metrics at the time the snapshot was made.

By default, the plugin requests all available metrics available for each report, although it is possible to specify only the desired fields if necessary.

Reports

  • Sponsored Products Report: Ad Groups
  • Sponsored Products Report: Campaigns
  • Sponsored Products Report: Campaigns - placement
  • Sponsored Products Report: Keywords
  • Sponsored Products Report: Keywords - query
  • Sponsored Products Report: Product Ads
  • Sponsored Products Report: Targets
  • Sponsored Products Report: Targets - query

Official Amazon Advertising API documentation for Sponsored Products reports can be found here.

Snapshots

  • Sponsored Products Snapshot: Ad Groups
  • Sponsored Products Snapshot: Campaign Negative Keywords
  • Sponsored Products Snapshot: Campaigns
  • Sponsored Products Snapshot: Keywords
  • Sponsored Products Snapshot: Negative Keywords
  • Sponsored Products Snapshot: Negative Ad Targets
  • Sponsored Products Snapshot: Product Ads
  • Sponsored Products Snapshot: Targets

Official Amazon Advertising API documentation for Sponsored Products snapshots can be found here.

Reports

  • Sponsored Brands Report: Ad Groups
  • Sponsored Brands Report: Campaigns
  • Sponsored Brands Report: Campaigns - placement
  • Sponsored Brands Report: Keywords
  • Sponsored Brands Report: Keywords - query
  • Sponsored Brands Report: Targets

Official Amazon Advertising API documentation for Sponsored Brands reports can be found here.

Snapshots

  • Sponsored Brands Snapshot: Campaigns
  • Sponsored Brands Snapshot: Keywords

Official Amazon Advertising API documentation for Sponsored Brands reports can be found here.

How to Manipulate Excel Data for Analytics
Recently at Zuar [https://www.zuar.com/], we had a user that needed to pull asubset of data from an Excel spreadsheet, and pivot that Excel data to create anew table with a specific data structure. Our approach to Data Value Chains helps companies refine and use their data tooutperform their co…

Amazon API: Authentication & Authorization

The Amazon Advertising API manages permissions using the Login with Amazon service.  The API uses authorization tokens and refresh tokens in a standard Oauth 2.0 flow.  Using these mechanisms, it is possible to grant access to data in the Amazon Advertising account on a profile-by-profile basis.

Plugin Configuration

Configuring the plugin is a two-step process.  The first step, which is performed only
once, involves provisioning the Amazon Advertising account for API access and creating credentials which can be used to gain access to the account's data. Documentation for this first step can be found here.

The second step, which can be repeated, involves running a simple wizard to create Runner jobs that acquire and load data for a single profile in the account. Documentation for the second step can be found here.

Once the wizard completes, the following jobs have been created within Runner:

  • A job to load information about all profiles in the account that the credentials have been granted access to

For each profile:

  • A job to load all of the profile's portfolios
  • A job for each of the reports and sequences listed earlier
  • A sequence containing all jobs for the profile.  Which jobs to enable and disable is
    chosen when the wizard is run.  The enabled/disabled status of any job in the sequence can easily be changed at any time in the UI.

Data Acquisition

Once the plugin is configured and credentials are provisioned, the plugin is usually
configured to run daily in the following manner:

  • Obtain all valid profile ids for the AAAPI account
  • For each profile id:
    • For each report type configured for the profile id
      • Request the report via the API, covering the period of time since the report last ran.
      • Wait until the report completes and then download the report to Runner.
      • Load the data from the report into Runner.
    • For each snapshot type configured for the profile id
      • Request the snapshot via the API.
      • Wait until the snapshot completes and then download the snapshot to Runner.
      • Load the data from the snapshot into Runner.

By default, the plugin organizes the jobs to run in sequence.  If desired, customers can easily change this organization in the UI, allowing more than one job to run at the same time.

Data Storage

If left unchanged, the wizard will configure all jobs to store data in the PostgreSQL
database internal to Runner.  This choice can easily be changed in the wizard, specifying output to any of Runner's supported databases, either locally or remote (e.g. Snowflake, Digital Ocean, etc.).

Both reports and snapshots downloaded from the Amazon Advertising API are in JSON format.  The raw reports and snapshots are stored locally on Runner, prior to being loaded into the database.  These files can either be removed immediately or saved for archival purposes.

Transport, warehouse, transform, model, report & monitor: learn how Runner gets data flowing from hundreds of potential sources into a single destination for analytics. Also, learn about our pre-built connector for Amazon Selling Partners.

Learn more about Runner's Amazon Advertising API:

Runner and Rclone Custom Jobs | Zuar
What’s Rclone and the Zuar Runner Rclone plug-in? We can explain how to use these programs for your data transfer needs.
Getting Started with Runner | Zuar
A collection of video tutorials and instructional content to help you start using Zuar Runner!
What is Amazon RDS? A set-up guide for this AWS service | Zuar
This guide provides an introduction to what Amazon RDS is, what this AWS service is used for, how to set up an RDS database.