Amazon Marketplace

Amazon is a huge global player when it comes to ecommerce – and a fantastic opportunity for growth! With an integration to Amazon Marketplace you can reach millions of customers you would not otherwise have access to.

The way PIM is meant to be used, products are placed in a warehouse and then gradually enriched while progressing through one or more workflows. At some point the product is then deemed ready for publication – perhaps based on channel-specific completeness rules – and published to one or more channels. The contents of each channel are then included in feeds, which are either actively or passively pushed to an endpoint (e.g. Amazon.)

As far as endpoints go, Amazon is on the more complex end of the scale – you need:

  • 4 different data feeds
  • 5 different scheduled tasks pushing the changes to Amazon

Before you can create an integration with Amazon, you need an Amazon Marketplace account. You also need to obtain:

  • An MwsAuthToken
  • A Seller Id
  • An AwsAccessKeyId
  • A Secret key

We assume that you are generally familiar with the concept of channels and feeds and other key features such as scheduled tasks.

As mentioned above, you need one or more channels to house the products you want to publish on Amazon Marketplace – this ensures that you have full control over which products are pushed to Amazon, and won’t publish incomplete products by accident.

If you haven’t created dedicated Amazon channels yet:

  • Go to Settings > PIM > Channels
  • Click New channel to open the channel
  • Enter a name
  • Save

Once created, the channel can be found under the PIM > Channels node. Right click the channel and create one or more channel groups – we recommend you create a structure which mirrors the Amazon Categories relevant for your product portfolio – then publish products to the channel in the usual manner.

As mentioned above, Amazon is a fairly complicated end-point insofar as it requires 4 different data feeds and 5 different scheduled tasks pushing the data in the feeds to the marketplace.

Luckily, all of these feeds can be based on the same query – to create a query for the feeds:

  • Go to Settings > Repositories and open a product index
  • Create a new query which returns the products you want to publish – this typically means:
    • You create a parameter of the type System.String – call it Language or something similar
    • You create an expression which checks that the SHOP IDs field contains the channel name (here Amazon)
    • You create an expression which checks that the Language ID field equals the Language parameter value

The idea with the Language parameter is that you can use the same query for multiple feeds – and simply set the parameter value on each feed. This means you won’t have to create different queries for e.g. Amazon UK, Amazon DK, or Amazon DE feeds.

Due to requirements on the Amazon-side, product data must be submitted in four separate feeds:

  • Images
  • Inventory
  • Prices
  • Products

All feeds are created in the standard manner using the template feed provider with feed-specific templates:

  • Amazon Images.cshtml
  • Amazon Inventory.cshtml
  • Amazon Prices.cshtml
  • Amazon Products.cshtml

These example templates have been developed to comply with the basics of current Amazon requirements, but these are of course subject to change and the templates will have to be changed accordingly, extended to include more than basic functionality, etc.

To submit data to Amazon, you must create four scheduled tasks to push data to Amazon asynchronously, where it is queued and updated as scheduled by Amazon. A fifth task requests a status and logs it in Dynamicweb.

If you’re wondering why data can’t be pushed live, as soon as changes are made, this is a limitation on the Amazon side of things; there’s a fairly punishing limit to the number of requests you can make per hour.

Each task uses a specific scheduled task add in:

Scheduled task

Add-in

Comments

Inventory

Amazon inventory feed

Submits stock levels to Amazon

Images

Amazon Images feed

Submits product images to Amazon

Prices

Amazon price feed

Submits product prices to Amazon

Products

Amazon products feed

Submits product data to Amazon

Feed submission

Amazon feed submission response handler

Submits a request for a status report and saves it to a log file.

While the four data-related tasks use a specific add-in, the add-in parameters (Figure 4.1) are identical.

Figure 4.1 Data feeds use a specific add-in but the parameters are identical

You must enter/select the following values required by Amazon:

  • A MWSAuthToken
  • A Seller id
  • An AwsAccessKeyId
  • A Secret key
  • A Service url
  • A Marketplace

You can use the Purge and Replace field to request that Amazon deletes all existing data, so only the submitted data is available. Amazon support staff will then contact the owner of the Amazon Marketplace account to confirm the request.

You must also specify a context for Dynamicweb:

  • A feed
  • A language
  • A currency
  • A shop

The Feed submission scheduled task (Figure 4.2) submits a request to Amazon for a status on the data submitted, and receives and stores the answer in logfiles.

Like the feed tasks, the following parameters are required by Amazon:

  • A MWSAuthToken
  • A Seller id
  • An AwsAccessKeyId
  • A Secret key
  • A Service url

When the feed submission task is run, a request is made to Amazon to return a status on all submitted content. Please note that the task will always succeed – to check whether the submission was actually successful or not you must consult the logfiles generated at /Files/System/Log/Amazon:

  • The Feeds folder contains logs with an overview of what has been submitted by the feed submission tasks
  • The Results folder contains information on whether or not a particular submission task succeeded or failed

The Fetch days back parameter controls how far back you want to fetch data for the Results logfiles – you can change this to a value which makes sense for your setup.