Project Amazon / Modelabs β
Context β
- Modelabs Mobiles is a French company that distributes mobile phones and accessories under license for brands such as Samsung, Sony, Lenovo, etc.
- Amazon.com is an American multinational technology company focusing on e-commerce, cloud computing, online advertising, digital streaming, and artificial intelligence. It has often been referred to as "one of the most influential economic and cultural forces in the world", and is often regarded as one of the world's most valuable brand. It is considered as one of the Big Five American technology companies, alongside Alphabet (parent company of Google), Apple, Meta (formerly Facebook Inc.) and Microsoft. (Source: Wikipedia)
Project β
- In addition to the connections to other solutions (Salsify), as part of the project with Modelbals, the platform is expected to connect to Amazon to enable the creation of product data sheets directly from the app.product-live.com application.
Expected use cases β
- Access the Amazon product structure from the app.product-live.com application, as you would with any product structure
- From scratch (without an ASIN code), create a product file in Amazon format, upload it to Amazon Vendor Central, and receive an acknowledgement from Amazon containing the status of the request (successful or unsuccessful), as well as an error list.
- Starting with a product already on Amazon (with an ASIN code), enrich a product file in Amazon format, publish it on Amazon Vendor Central, and receive an acknowledgement from Amazon containing the status of the request (success or failure), as well as a possible error list.
Details β
- The Modelabs project focuses solely on publishing product listings to Amazon's services. Other perimeters, such as publishing stock information, exporting orders, extracting analytics, etc., are not covered.
- The only target market is France (Amazon offers a product structure by market, and the Modelabs project is limited to France only).
Project Timeline β
- 10/2021: Launch of a project to identify the technical and product issues still to be addressed in order to tackle the "Amazon problem". (#997)
- 04/2022: Further investigations - Listing the missing elements to model the Amazon product structure. As the priority was to deliver another account (Auchan), it was decided not to implement the features identified. (#1652)
- 07/2022: Design and implementation of a new capability for the platform: to enable the creation of Data Factory tasks outside the platform and without the help of the engineering team. The aim is to be able, in due course, to rapidly develop a Proof of Concept regarding the connection to Amazon (and other) services. (#1987, the resulting API)
- 12/2022: The customer success team manages to sell (among other things) an Amazon connection project to the Modelabs Mobile account - Beginning of the project.
- 01/2023: Deployment of a first task dedicated to connecting to Amazon services - This first task allows, within a Data Factory job, to retrieve Amazon data structures. (#2511, the task in question)
- 02/2023: The pre-sales/project team takes over - Using the tools provided by the Product-Live platform, the aim is to transpose the Amazon structure into the platform.
- 05/2023: The Amazon structure has been imported into the platform - Next step: Publish a first product. Beginning of a development project aimed at creating a Product-Live application within the Amazon store, allowing Modelbas to delegate the necessary authorizations to us, enabling us to set up a Data Factory job advertising products on their behalf.
Amazon Terminology β
- ASIN: Amazon Standard Identification Number. A unique identifier assigned by Amazon.com and its partners for product identification within the Amazon organization.
- Selling partner: A selling partner can be a seller or a vendor.
- Seller: A seller lists and sells their own goods on Amazon's retail website. After an item is sold, it is either (1) directly fulfilled by the seller using inventory managed by the seller, or (2) fulfilled through the Fulfillment by Amazon (FBA) program, using the seller's FBA inventory.
- Vendor: A vendor supplies the inventory that is sold by Amazon on Amazon's retail website. There are two main types of vendors: Retail procurement vendors and Direct fulfillment vendors.
- Retail procurement vendor: A retail procurement vendor sells inventory to Amazon and ships it to Amazon's fulfillment centers. Amazon then sells and ships the inventory to customers who make purchases on Amazon's retail website. A retail procurement vendor can be a brand owner or a distributor. In some cases they manage the listings of the products that they supply to Amazon.
- Direct fulfillment vendor: A direct fulfillment vendor ships orders to customers on Amazon's behalf. After a customer makes a purchase from Amazon on Amazon's retail website, the direct fulfillment vendor ships the order directly to the customer.
- Amazon Selling Partner API: The Selling Partner API (SP-API) is a REST-based API that helps Amazon selling partners programmatically access their data on orders, shipments, payments, etc..
The project β
A Product-Live app registered on Amazon Seller calls the SP-API to modify products listed on Amazon, in behalf of a Selling Partner.
Three actors are involved:
a Selling Partner
- has an account on Amazon Seller and one on PL
- has an
idfrom its Amazon Seller account - to authorise apps, the Selling Partner needs admin permissions on its Amazon Seller account.
a Product-Live app attached to the Product-Live Amazon Seller account
- registered on the Amazon Seller marketplace.
- has an app_id
- has a set of LWA credentials (
client_idandclient_secret).
an iam User attached to an aws account
- has aws credentials (
access_key,secret_key); - can ask for temporary credentials (temporary
access_key,secret_key,session_token).
- has aws credentials (
Step 1: Pull and import the Amazon Product Structure β
Pull the Amazon Product Structure β
We were able to pull the product structure from Amazon using the Amazon Selling Partner API. The result is a set of JSON files, one per product category. The files are available in the assets folder.
Product-Live Amazon Seller account
- Early in the project, we had to create an Amazon account for the Product-Live platform. This account is used to test the connection to Amazon services and to deploy the Product-Live application in the Amazon store. We also add to register the Product-Live platform as a "developer".
Regarding the aws account and iam User configuration, the following steps are required:
- Create an Amazon Web Services (AWS) account
- Create an IAM user
- Create an IAM policy
- Create an IAM role
- Add an AWS STS policy to your IAM user
Then we can create our Amazon application using the resources previously created:
- Create an Amazon application (a private one at this point)
- Get the LWA credentials (client ID and client secret)
Build a specific Data Factory task and use the acquired credential to pull the product structure from Amazon.
- An iam user can make a call to the SP API, it needs both its aws credentials (for authentication) and a refresh token from the Selling Partner (for authorization). Some operations (not many) are "grantless", meaning the
access_tokenis not needed. In the initial version of this task, the authorization was granted from a test user, associated with the Product-Live Amazon Seller account. - This task, while fully functional, is not yet integrated into the Product-Live platform. It is therefore necessary to:
- Deploy it manually, once per account that needs to connect to Amazon
- Create an associated
Taskusing the Product-Live API, and use the task ID in the Data Factory job build for the purpose of pulling the Amazon product structure.
- An iam user can make a call to the SP API, it needs both its aws credentials (for authentication) and a refresh token from the Selling Partner (for authorization). Some operations (not many) are "grantless", meaning the
Step 2: Import the Amazon Product Structure into the Product-Live platform β
Step 3: Publish a first product β
- To accomplish this step, we have decided to propose a public application on the Amazon store. This application will allow Modelabs to delegate the necessary authorizations to us, enabling us to set up a Data Factory job to publish products on their behalf (see alternative solutions here).
- See: What is the Selling Partner Appstore, List your app on the Selling Partner Appstore
- The application is used to obtain the necessary authorizations to publish products on behalf of a seller or a vendor.
- The authorization model for the Selling Partner API is based on Login with Amazon, Amazon's implementation of OAuth 2.0. In this model our application is authorized through interactions with pages displayed by Amazon and by our website. The web browser is the user-agent that passes parameters between our website and Amazon at each selling partner action. (see)
- Public applications for vendor (Modelabs case) can be authorized using Website authorization workflow. An OAuth authorization workflow initiated from our own website.
- More details here about the Oauth 2.0 authorization workflow