Tableau Connector for Amazon Marketplace

Build 23.0.8839

Configuring a Connection

After Installing the Connector you can connect and create a Data Source for data in Amazon Marketplace.

Setting Up a Data Source

Complete the following steps to connect to the data:

  1. Under Connect | To a Server, click More....
  2. Select the data source called Amazon Marketplace by CData.
  3. Enter the information required for the connection.
  4. Click Sign In.
  5. If necessary, select a Database and Schema to discover what tables and views are available.

Using the Connection Builder

The connector makes the most common connection properties available directly in Tableau. However, it can be difficult to use if you need to use more advanced settings or need to troubleshoot connection issues. The connector includes a separate connection builder that allows you to create and test connections outside of Tableau.

There are two ways to access the connection builder:

  • On Windows, use a shortcut called Connection Builder in the Start menu, under the CData Tableau Connector for Amazon Marketplace folder.
  • You can also start the connection builder by going to the driver install directory and running the .jar file in the lib directory.

In the connection builder, you can set values for connection properties and click Test Connection to validate that they work. You can also use the Copy to Clipboard button to save the connection string. This connection string can be given to the Connection String option included in the connector connection window in Tableau.

Connecting to Amazon Marketplace

Amazon MWS API vs Selling Partner API

Amazon MWS (Marketplace Web Services) API is the older API for the Amazon Marketplace while Selling Partner (SP) API provides number of improvements over MWS API including JSON-based REST API design standards and OAuth 2.0. SP-API includes all functionality available in Amazon MWS API.

You may specify which API to connect to by setting Schema. Please be aware that each API has different available connection options as described below.

Connecting to Selling Partner API

When using the Amazon Selling Partner API to connect to the Amazon Marketplace, the following properties are required:

  • Schema: Set this to SellingPartner.
  • InitiateOAuth: Set this to GETANDREFRESH.
  • Marketplace: Set this to the Marketplace region that you are registered to sell in.
Also, you can use the SellingPartner property to choose Seller or Vendor authentication.

Connecting to the MWS API

When using the Amazon MWS API to connect to the Amazon Marketplace, SellerId, Marketplace, Marketplace are required connection properties. Set Schema to Marketplace.

Configure Access to Amazon Marketplace

To connect to Amazon Marketplace first authorize CData developer. To do so follow the steps below:

  • Using the CData MWS developer id: 195280669143.
  • Go to the Manage your apps page in Seller Central and log into your Amazon seller account as the primary account holder.
  • Click the Authorize new developer button and follows the authorization workflow using the developer id provided by the connector.

Or you can go to Amazon Marketplace CData Driver and click Authorize Now on the right panel.

Obtaining the MWS Auth Token

To obtain the MWS Auth Token, follow the steps below:

  • Go to the Manage your apps page in Seller Central and log into your Amazon seller account as the primary account holder.
  • Find the CData App.
  • Under the MWS Auth Token Column click View.

Obtaining the Seller ID

To obtain the Seller ID follow the steps below:

  • Login to your seller account.
  • Select Settings, then Account Info on upper right of screen.
  • Under Business Information select "Your Merchant Token".

Authenticate to Amazon Marketplace

Amazon Marketplace Accounts

Set the following connection properties to connect:

  • SellerId: Set the Seller ID of Amazon marketplace web service settings.
  • Marketplace: Set the Amazon marketplace location (for example, United States).
  • Schema: Set Schema to Marketplace.

OAuth

Amazon Marketplace uses the OAuth authentication standard.

To authenticate using OAuth, you must either use the embedded application or create a new custom OAuth app. The embedded application supports desktop applications and headless machines. Web applications require that you create a custom OAuth application.

You can use a custom OAuth application to authenticate with a service account or a user account. See Creating a Custom OAuth App for more information.

Downloading Embedded Credentials

Because Amazon Marketplace requires that embedded credentials rotate every six months, CData credentials are hosted on oa.cdata.com. If you do not specify custom credentials, the embedded credentials are downloaded from our web service and saved in the location specified in OAuthClientLocation by default. NOTE:Make sure your firewall does not block oa.cdata.com.

Desktop Apps

You can use the embedded application or create a custom OAuth application. The key difference is that you must set additional connection properties if you use a custom application.

Get and Refresh the OAuth Access Token

After setting the following, you are ready to connect:

  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
  • Marketplace: Set this to the Marketplace region that you are registered to sell in.
  • AppId: Set this to the application Id for the Selling Partner application you created.
  • Schema: Set this to SellingPartner to connect to SP-API.
  • AWSAccessKey: This is the Access Key tied to the AWS user that is associated with the OAuthClientId.
  • AWSSecretKey: This is the Secret Key tied to the AWS user that is associated with the OAuthClientId.
  • OAuthClientId (custom applications only): Set this to the client Id assigned when you registered your app.
  • OAuthClientSecret (custom applications only): Set this to the client secret assigned when you registered your app.
When you connect the connector opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The connector then completes the OAuth process:

  1. Extracts the access token from the callback URL and authenticates requests.
  2. Refreshes the access token when it expires.
  3. Saves OAuth values in OAuthSettingsLocation. These values persist across connections.

Next Step

See Using the Connector to create data visualizations.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839