Amazon return cancellation flow
Problem statement:
Amazon is sending more than one “AMAZON_PRIME_RETURN_UPDATE_OBJECT
” event for a single item present in order.
For Example: vendorOrderNumber: 408-5190151-3570748
contains only 1 item in order and we received 2 events of “CreateReturn” from amazon with different customerreturnnumber and different reverseTrackingId.
The below table shows the events of returns received by amazon in chronological order.
Events Received | customerReturnNumber | reverseTrackingId | status |
---|---|---|---|
AMAZON_PRIME_RETURN_CREATE_OBJECT |
|
|
|
|
|
|
|
|
|
|
|
AMAZON_PRIME_RETURN_CREATE_OBJECT |
|
|
|
|
|
|
|
|
|
|
|
From above table it is clear that amazon is sending us duplicate events for the same items.
Cases that we have to handle:
CASE 1: Amazon sending duplicate create event for single items. Sample is given above.
For this we
CASE 2: Amazon is sending Create event with IN_TRANSIT status hence it is missed by our system. Sample orderId : 95dd7ca1-723d-4e0a-9bda-6009e9e4d636 HANDLED
Questions to be asked:
Q1. If a order contains two exactly same items then, does amazon send two different events of return or just send one event with quantity 2 in the event.