Infrastructure Template
This is a template of the Amazon EDI’s infrastructure diagram and corresponding breakdown.
You are required to create a similar article for your module/component
Project name: Amazon EDI
External Services
Unicommerce
AS2 Gateway
ATS(Amazon Transportation Service)
Internal Services(App Engine)
Unicommerce-Inventory Service
Inventory Update Service
WMS-API
Middlware
Notifications
Unicommerce-ofr service
GCP Tools used:
Pub/Sub
Google Cloud SQL(Primary DB)
Memcache
Compute Engine(Nginx)
Cloud Storage
Infrastructure Diagram
Here is a Breakdown of the flow:
Unicommerce sends Sampling and Inventory update of items to Unicommerce Inventory Service against the respective EDI site/Fulfillment Channel. This is an authentication based service.
Unicommerce Inventory Service pushes the data to a Pub/Sub queue.
The Pub/Sub queue submits the data to its subscription of Inventory Update Service
Inventory Update Service updates the Sampling/Inventory data of the items in the Primary DB.Then it pushes the Sampling/Inventory update to Pub/Sub queue.
Pub/Sub queue submits the data to Notifications Service which further transforms it to SAM/IAN messages and sends to AS2 Gateway.
Amazon sends the messages like OF/OC/CRN/Invoice to AS2 Gateway.
AS2 Gateway sends these messages to a Pub/Sub queue: incoming-notifications
This Pub/Sub queue submits the data to its subscription of Middleware Service.
Middleware service reads the incoming message file(XML) from the Cloud Storage bucket and transforms it to respective resource object(XML → JSON) and submits the data to WMS API Service, which is an authentication based service.
WMS API Service performs the following actions:
OF- Creates order/shipment into WMS ans pushes the same to Unicommerce
Invoice- Updates the invoice against respective Shipment
OC- Cancels the shipment upto “PICKED” status, else rejects the cancellation and submits the OCR event in both cases.
CRN- Sends back IAN as per CRN inventory adjustment for the given shipment item.
Unicommerce submits +OFR(FULFILLABLE) or -OFR(UNFULFILLABLE) against a shipment to Unicommerce OFR Service, which is an authentication based service.
Unicommerce OFR Service submits the data to a Pub/Sub queue
Pub/Sub queue submits the data to its subscription of WMS API service
WMS API updates the shipment status as ACCEPTED(+OFR) or REJECTED(-OFR) in the Primary DB and submits the respective shipment event to a Pub/Sub queue.
Pub/Sub queue submits this shipment event to its subscription of Notifications Service which further transforms it to OFR message and sends to AS2 Gateway.
Unicommerce sends following requests to WMS API sequentially :
Request to to fetch invoice for a shipment. It updates the shipment status as “PICKED” and submits the shipment event for it to a Pub/Sub queue.
Request to fetch label of a shipment
WMS API Service transforms the request data(for label) and submits the same to AMZ EDI LABEL Service, which fetches the label from ATS(Amazon Transportation Service), which is further returned to Unicommerce in response. WMS API Service updates the shipment status as “PACKED” and submits the shipment event for it to a Pub/Sub queue.
All the outgoing notifications(SAM, IAN, OFR, ASN. OCR, ILN etc) are submitted to a common Pub/Sub queue: outgoing-notifications.
Pub/Sub queue: outgoing-notifications further hits to its subscription of AS2 gateway.
AS2 Gateway forwards the messages to Amazon.