GetOrders Statuses
Status management
eBay orders have 4 status fields that need to be taken in consideration when deciding the internal status of the order. These are as follows
- OrderStatus
- CheckoutStatus > Status
- CheckoutStatus > eBayPaymentStatus
- CancelStatus
These work in relation to each other having higher and lower priority and working based on an insert or update functionality. Please see detailed explanation below
- OrderStatus
- eBay docs
- Explanation by status
- Active - in the general case this is a status that indicates something is still pending on the order or it has had problems (an open case, is cancelled, etc.). It is to be mapped to 3 different tool statuses in Hemisphere based on the different case:
- Pending
- CancelStatus is "NotApplicable" / "CancelClosedForCommitment" / "CancelRejected" and at least one of the following is true
- CheckoutStatus > eBayPaymentStatus is one of the following values - "PaymentInProcess" / "PayPalPaymentInProcess"
- CheckoutStatus > Status is "Incomplete" / "Pending"
- CancelStatus is "NotApplicable" / "CancelClosedForCommitment" / "CancelRejected" and at least one of the following is true
- Incomplete
- CancelStatus is ''CancelFailed" / "CancelPending" / "CancelRequested" / Other unexpected value
- CancelStatus is "NotApplicable" / "CancelClosedForCommitment" / "CancelRejected" and at least one of the following is true
- CheckoutStatus > eBayPaymentStatus is "BuyerCreditCardFailed" / "BuyerECheckBounced" / "BuyerFailedPaymentReportedBySeller" / Other unexpected value
- CheckoutStatus > Status is Other unexpected value
- Cancelled
- CancelStatus is "CancelClosedNoRefund" / "CancelClosedUnknownRefund" / "CancelClosedWithRefund" / "CancelComplete"
- Pending
- Completed - in the general case this is a status that indicates that the order should be completed, nothing else can be changed on it and with payment checks it should be ready for fulfillment. It is to be mapped to 3 different statuses
- Pending
- Every data validation and status of the order are on end statuses - CancelStatus is "NotApplicable" / "CancelClosedForCommitment" / "CancelRejected", CheckoutStatus > eBayPaymentStatus is "NoPaymentFailure", CheckoutStatus > Status is "Complete" and PayPal active is true
- CancelStatus is "NotApplicable" / "CancelClosedForCommitment" / "CancelRejected" and at least one of the following is true
- CheckoutStatus > eBayPaymentStatus is "PaymentInProcess" / "PayPalPaymentInProcess"
- CheckoutStatus > Status is "Incomplete" / "Pending"
- Incomplete
- CheckoutStatus > eBayPaymentStatus is Other unexpected value
- CheckoutStatus > Status is Other unexpected value
- CancelStatus is Other unexpected value
- ReadyForShipping
- Every data validation and status of the order are on end statuses (CancelStatus is "NotApplicable" / "CancelClosedForCommitment" / "CancelRejected", CheckoutStatus > eBayPaymentStatus is "NoPaymentFailure", CheckoutStatus > Status is "Complete") and PayPal active is false
- Pending
- Every other status should be treated as Incomplete tool status in Hemisphere
- Active - in the general case this is a status that indicates something is still pending on the order or it has had problems (an open case, is cancelled, etc.). It is to be mapped to 3 different tool statuses in Hemisphere based on the different case:
- CheckoutStatus > Status
- eBay docs
- Explanation by status
- Complete - in general status showing the payment process is finished successfully
- The only status under which we should move to a ReadyForShipping tool status (or Pending in the case of PayPal active true)
- Incomplete - in general status showing the payment process is yet to be initiated
- This status should be a marker for Pending tool status
- Pending - in general status showing the payment process has been initiated but yet to be fully processed
- This status should be a marker for Pending tool status
- Complete - in general status showing the payment process is finished successfully
- ChekoutStatus > eBayPaymentStatus
- eBay docs
- Explanation by status
- BuyerCreditCardFailed - Credit Card Payment Failed - applicable only when CC payments are allowed
- This status should be a marker for Incomplete tool status (expectation is for such statuses to be seen only with the "Active" OrderStatus)
- BuyerECheckBounced - ECheck Payment Failed - applicable only when ECheck payments are allowed
- This status should be a marker for Incomplete tool status (expectation is for such statuses to be seen only with the "Active" OrderStatus)
- BuyerFailedPaymentReportedBySeller - Other Payment (CashOnDelivery) Failed - an option only triggered by the Seller (expectation is to never see this)
- This status should be a marker for Incomplete tool status (expectation is for such statuses to be seen only with the "Active" OrderStatus)
- NoPaymentFailure - end status for the field
- This status should be a marker that should be used in combination with Status = "Complete" to mark a Checkout on eBay as completed and be used for a ReadyForShipping tool status (Pending when PayPal active is true)
- PaymentInProcess - Payment is still in Process - applicable only when using different than PayPal payments (rare occasion)
- This status should be a marker for Pending tool status (expectation is for such statuses to be seen mostly with the "Completed" OrderStatus)
- PayPalPaymentInProcess - PayPal Payment is still in Process - applicable only when using PayPal payments (most cases)
- This status should be a marker for Pending tool status (expectation is for such statuses to be seen mostly with the "Completed" OrderStatus)
- BuyerCreditCardFailed - Credit Card Payment Failed - applicable only when CC payments are allowed
- CancelStatus
- eBay docs
- Explanation by status
- CancelClosedForCommitment - Buyer has requested cancellation at some point but has thought over and decided to continue with the order
- This status should be a marker for continuing with the logic following the other higher priority statuses (treating as a "NotApplicable status" as potentially the client should've agreed to continue with the order and whatever the previous status of the order has been this should come with a status letting us to continue with the fulfillment of the order)
- CancelClosedNoRefund - Cancellation is completed with no refund being processed to the Buyer
- This status should be a marker for Cancelled tool status - following the logic of other higher priority statuses
- CancelClosedUnknownRefund - Cancellation is completed without knowledge whether or not a refund has been processed to the Buyer
- This status should be a marker for Cancelled tool status - following the logic of other higher priority statuses
- CancelClosedWithRefund - Cancellation is completed and a refund has been processed to the Buyer
- This status should be a marker for Cancelled tool status - following the logic of other higher priority statuses
- CancelComplete - Cancellation is completed
- This status should be a marker for Cancelled tool status - following the logic of other higher priority statuses
- CancelFailed - Cancellation has failed
- This status should be a marker for Incomplete tool status
- CancelPending - Cancellation request is approved but Pending to be completed
- This status should be a marker for Incomplete tool status
- CancelRejected - Cancellation requested by the Buyer has been Rejected
- This status should be a marker for continuing with the logic following the other higher priority statuses (treating as a "NotApplicable status" as potentially the client's cancellation request has been rejected and whatever the previous status of the order has been this should come with a status letting us to continue with the fulfillment of the order)
- CancelRequested - Cancellation has been requested by the Buyer
- This status should be a marker for Incomplete tool status
- Invalid - The order Cancellation request is invalid
- This status should be a marker for Incomplete tool status
- NotApplicable - Not applicable to this order
- This status should be a marker for continuing with the logic following the other higher priority statuses as there are no cancellations on the order
- CancelClosedForCommitment - Buyer has requested cancellation at some point but has thought over and decided to continue with the order
How to handle the order statuses
Handling the eBay statuses in Hemisphere will take more than the mapping to the tool statuses. This includes inserts versus updates and what information to be actually updated when making changes. To make sure proper information is downloaded and stored in Hemisphere we should follow the next few rules:
- General order information (order items, addresses, totals, etc.) should be updated with new information only if an order is still on any of the flows explained in points 1.b.i.1, 1.b.i.2 and 1.b.ii
- Other updates based on the flows logic should be done only to the status fields in Hemisphere - this includes Order Payment statuses which are to be introduced as Payment Details are to be stored directly coming from eBay and just be confirmed by the PayPal integration
- As we are to confirm a payment when PayPal active is true directly with PayPal but there is also a new option where we might have tool status Pending and MP order status Completed we must change the selection for PayPal to fire a payment check call. The MP integration (eBay in this case) needs to make a check with it's statuses and raise a flag in the Payment details record created to enable PayPal to make the check. For eBay this means a that the following statuses should be:
- PayPal active = true
- OrderStatus = "Completed"
- CheckoutStatus > eBayPaymentStatus = "NoPaymentFailure"
- CheckoutStatus > Status = "Complete"
- Last but not least we must do a change to the marking of OutOfStock orders. This should be taken separately to a simple flag on Order level to be marked when we are updating/inserting an order as flows explained in points 1.b.ii.1.a and 1.b.ii.3. This way simple out of stock products will not mess with the standard order flow and status change and Incomplete can be used as what it is meant to be used - a problem order. To expand on the new OutOfStock flag on order level this needs to be raised only by the eBay integration (nothing to do with PayPal now that it is not a status)