Difference between revisions of "Amazon Integration"
Line 1: | Line 1: | ||
+ | == Setting Up Amazon Integration== | ||
+ | |||
+ | To enable integration with Amazon.com, uncomment the line for the Amazon.com component in hot-deploy/component-load.xml | ||
+ | |||
== Basic Workflow == | == Basic Workflow == | ||
− | * Pending order documents are downloaded from Amazon and stored periodically (opentaps.amazon.storePendingOrderDocuments service) | + | * Product Importing |
− | * Acknowledgement is posted to Amazon of downloaded order documents (opentaps.amazon.acknowledgeOrderDocumentDownload service) | + | ** The Amazon integration component disallows the changing of the ASIN and SKU GoodIdentification numbers in the catalog manager. |
− | * Amazon orders are extracted from stored order documents (opentaps.amazon.extractOrdersForImport service) | + | * Customer Matching |
− | * Extracted orders are imported into the Opentaps data model (opentaps.amazon.importOrders service) | + | ** Amazon uses email address as the unique identifier of a customer. |
− | * Acknowledgement is posted to Amazon of imported orders (opentaps.amazon.acknowledgeImportedOrders service) | + | ** Amazon sends phone numbers which are parsed with regex into separate area code and phone numbers |
+ | ** Amazon sends state and country codes which are matched against the Geo and GeoAssoc entities in opentaps. | ||
+ | * Order Importing | ||
+ | ** Pending order documents are downloaded from Amazon and stored periodically (opentaps.amazon.storePendingOrderDocuments service) | ||
+ | ** Acknowledgement is posted to Amazon of downloaded order documents (opentaps.amazon.acknowledgeOrderDocumentDownload service) | ||
+ | ** Amazon orders are extracted from stored order documents (opentaps.amazon.extractOrdersForImport service) | ||
+ | ** Extracted orders are imported into the Opentaps data model (opentaps.amazon.importOrders service) | ||
+ | ** Acknowledgement is posted to Amazon of imported orders (opentaps.amazon.acknowledgeImportedOrders service) | ||
− | + | There are no execution dependencies - these steps will all run independently from one another by scheduled jobs and will operate on whatever data is available in the right condition at each runtime. | |
== Services == | == Services == | ||
Line 100: | Line 111: | ||
'''opentaps.amazon.userName''' | '''opentaps.amazon.userName''' | ||
− | |||
− | |||
− | |||
− | |||
== To Do == | == To Do == |
Revision as of 18:05, 25 September 2007
Contents
Setting Up Amazon Integration
To enable integration with Amazon.com, uncomment the line for the Amazon.com component in hot-deploy/component-load.xml
Basic Workflow
- Product Importing
- The Amazon integration component disallows the changing of the ASIN and SKU GoodIdentification numbers in the catalog manager.
- Customer Matching
- Amazon uses email address as the unique identifier of a customer.
- Amazon sends phone numbers which are parsed with regex into separate area code and phone numbers
- Amazon sends state and country codes which are matched against the Geo and GeoAssoc entities in opentaps.
- Order Importing
- Pending order documents are downloaded from Amazon and stored periodically (opentaps.amazon.storePendingOrderDocuments service)
- Acknowledgement is posted to Amazon of downloaded order documents (opentaps.amazon.acknowledgeOrderDocumentDownload service)
- Amazon orders are extracted from stored order documents (opentaps.amazon.extractOrdersForImport service)
- Extracted orders are imported into the Opentaps data model (opentaps.amazon.importOrders service)
- Acknowledgement is posted to Amazon of imported orders (opentaps.amazon.acknowledgeImportedOrders service)
There are no execution dependencies - these steps will all run independently from one another by scheduled jobs and will operate on whatever data is available in the right condition at each runtime.
Services
opentaps.amazon.storePendingOrderDocuments
This service requests all pending order documents from Amazon and stores each document in the AmazonOrderDocument entity. The service will fail only if there is a database error or a communication error with Amazon. Each document is treated separately - if the download of one document fails, the AmazonOrderDocument record will reflect the error and reason, but other documents in the same batch won't be affected. If a document download fails, the service will keep trying to download it from Amazon at each run. Documents will also fail if they consist of invalid or unparseable XML.
opentaps.amazon.acknowledgeOrderDocumentDownload
This service finds any AmazonOrderDocuments in the database which have been successfully downloaded, but for which download acknowledgement has not yet been posted back to Amazon, and posts that acknowledgement. The service will fail only in the case of a database error. If there is an error posting acknowledgement, each of the affected AmazonOrderDocuments will reflect the failure and the reason.
opentaps.amazon.extractOrdersForImport
This service finds any AmazonOrderDocuments in the database which have been successfully downloaded *and* successfully acknowledged, and attempts to parse each document in order to extract information about Amazon orders. The service will fail only in the case of a database error. Order documents are dealt with in an atomic fashion - if a document is unparseable or there is a problem extracting or storing order information into the import tables for any order in an order document, the entire order document will be marked as a failure and no orders will be extracted from it.
opentaps.amazon.importOrders service
opentaps.amazon.acknowledgeImportedOrders
Entities
AmazonOrder
AmazonOrderDocument
AmazonOrderImport
AmazonOrderItem
AmazonOrderItemFee
AmazonOrderItemImport
AmazonOrderItemPriceComp
AmazonOrderItemPromo
AmazonOrderItemTaxAmount
AmazonOrderItemTaxJurisdtn
AmazonOrderItemTaxRate
AmazonParty
Configuration Properties
opentaps.amazon.createdByAmazonApplication
opentaps.amazon.import.approveOrders
opentaps.amazon.import.carrierPartyId.Expedited
opentaps.amazon.import.carrierPartyId.Standard
opentaps.amazon.import.decimalPrecision
opentaps.amazon.import.decimalRounding
opentaps.amazon.import.maxDaysToShip.Expedited
opentaps.amazon.import.maxDaysToShip.Standard
opentaps.amazon.import.organizationPartyId
opentaps.amazon.import.phone.regexp
opentaps.amazon.import.phone.regexp.group.areaCode
opentaps.amazon.import.phone.regexp.group.countryCode
opentaps.amazon.import.phone.regexp.group.extension
opentaps.amazon.import.phone.regexp.group.phoneNumber
opentaps.amazon.import.productStoreId
opentaps.amazon.import.salesChannel
opentaps.amazon.import.shipmentMethodTypeId.Expedited
opentaps.amazon.import.shipmentMethodTypeId.Standard
opentaps.amazon.merchantIdentifier
opentaps.amazon.merchantName
opentaps.amazon.password
opentaps.amazon.url
opentaps.amazon.userName
To Do
- How to handle tax authority lookup
- Service to post shipping acknowledgement back to Amazon (charge-when-ship)
- Email notification of errors