commerce_amazon_sp_api
Drupal Commerce Core integration with Amazon Selling Partner API.
https://developer-docs.amazon.com/sp-api/
Integrated SP API features:
- Fulfillment Outbound API - https://developer-docs.amazon.com/sp-api/docs/fulfillment-outbound-api-v2020-07-01-reference
- FBA Inventory API - https://developer-docs.amazon.com/sp-api/docs/fbainventory-api-v1-reference
What this module does?
Sync stock/inventory from your Amazon Merchant account and link them with existing product variations inside Drupal. Set marketplace conditions upon which you can create fulfillment orders on Amazon. Track your Amazon fulfillment order and transition your Drupal order based on status updates from Amazon.
Is this module what I need?
If you want to place orders from Drupal to fulfill with Amazon, this is the module for you. If you want to manage your Amazon listings, this is not the module for you.
The module has API calls for Amazon Product listing, but this feature is not implemented fully within Drupal Commerce.
REQUIREMENTS
This module requires Drupal Commerce Core (v2 or v3) and Commerce Shipping.
ARCHITECTURE
Drupal module provides four entity types which are interacting with Amazon SP API.
- Amazon App
- the app which you created under you Amazon Seller Central account.
- List all available markets from your Amazon merchant account.
- handles authentication
- Amazon Marketplace
- The Amazon marketplace by region (as associated with parent Amazon App).
- references Amazon APP
- references items from that marketplace with Amazon Item entity.
- Amazon Item
- The items from Amazon inventory linked to your Drupal variations.
- Items are listed under the Amazon marketplace.
- Amazon Fulfillment
- the order created on Amazon based on conditions from Amazon Marketplace entity.
- holds reference to Amazon Marketplace, Commerce Core order
INITIAL SETUP
- Create SP API type app in Amazon Seller Central (choose Sellers under Business entities)
- Self-authorize your app - copy refresh token
- Create Amazon App inside Drupal -
/admin/commerce/amazon/apps- Fill all token and client data
- Choose mode
- Create Amazon Marketplace inside Drupal -
/admin/commerce/amazon/marketplace- Choose the Amazon App that you created in the previous step
- Choose Marketplace - you can select only one region
- Leave
Sync items from FBA inventorychecked on if you want to automate inventory sync - Select desired conditions upon an order placed in Drupal are going to be sent to the Amazon to be fulfilled.
- Run cron to initially sync inventory
- Go to general settings -
/admin/commerce/config/amazon-sp-api/settings- Set desired sync period - from 10 to 60 minutes
- Enable order integration and map states if you want to automate Commerce Core order workflow based on Fulfillment status from Amazon
- Place an order to test.