From Opentaps WikiJump to navigationJump to search
Setting Up Amazon Integration
To enable integration with Amazon.com:
- Uncomment the line for the Amazon.com component in hot-deploy/component-load.xml
- Load the seed data in hot-deploy/amazon/data/AmazonSeedData.xml
- Load the demo data in hot-deploy/amazon/data/AmazonDemoData.xml or use it as a guide to configure your own data
- Configure the following properties in hot-deploy/amazon/config/amazon.properties (see below for descriptions of the properties):
- 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)
- Acknowledgement is posted to Amazon of fulfilled (shipped) order items. This is accomplished by two independent services: opentaps.amazon.queueShippedItemsForFulfillmentPost, which is responsible for detecting shipment of order items related to Amazon orders (currently via an entity-ECA triggered by the update of a ShipmentRouteSegment.carrierServiceStatusId to SHRSCS_ACCEPTED) and queueing them for fulfillment acknowledgement; and opentaps.amazon.acknowledgeFulfilledOrderItems which posts the fulfillment acknowledgement to Amazon of any order items in the acknowledgement queue.
- Posted acknowledgement documents are periodically checked for availability of their related processing report from Amazon. If the processing report becomes available it will be retrieved and the statuses of the related objects updated according to the information in the report.
- 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.
|opentaps.amazon.storePendingOrderDocuments||Orders||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||Orders||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||Orders||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.|
- Relation of Amazon taxLocationCode to Opentaps taxAuthorityId
- Order cancellation prior to import
- Order cancellation after import
- Order refund
Order Item Fulfillment (Charge-When-Ship)
|1||Order an item on Amazon.com and wait until the order has been imported into Opentaps. Pack the full order and schedule the shipment with a carrier. Wait until the scheduled job for the opentaps.amazon.queueShippedItemsForFulfillmentPost and opentaps.amazon.acknowledgeFulfilledOrderItems services have both run, in that order (or run them manually).||Result: There should be AmazonOrderItemFulfillment records representing the fulfilled order items, for which the ackStatusId field should be AMZN_SHIP_ACK_ERR. The orders should be marked 'Confirmed' in the Amazon Seller Central site's 'Manage Orders' screen.|
|2||Place a multiple-item order on Amazon.com and wait until the order has been imported. Pack part of the order and schedule the shipment with a carrier. Wait until the two services have run as above.||The order should not be marked confirmed in Seller Central, since it hasn't all been shipped.|
|3||Pack the rest of the order from case 2 and schedult the shipment. Wait until the two services have run as above.||The order should be marked confirmed in Seller Central, since it has been fully shipped.|