Generic Marketplace claim store and behaviour [TBR]
This document’s purpose is to describe how should we be storing the claim data(returns requests, cancel requests, etc.) if the marketplace supports it.
Claim body:
- As there can be more than one type of claim we need to know what was the claim type. Possible values:
- Return
- Cancel
- Exchange
-
As different requests can be initiated by different parties we would need to have this information. In the most common case the three different parties that can initiate the request can be the Buyer, the Seller, or the Marketplace.
-
The next thing we would need to have is the Action that has been taken. Most commonly there are three types of actions:
- Accept
- Reject
- Hold
- We need to have a Status in there so we can use it to define our different logics. Values should be as follows:
- Pending
- Sent
- Completed
- Error
Pending would be used when we download the claim but no Action has been taken.
Sent would be used when we have performed an Action and that Action has been sent to the Marketplace.
Completed would be used when we have received a response from the Marketplace that the Action has been successfully performed.
Error would be used if there an Error was either received from the Marketplace or an internal validation hasn’t been passed.
-
The next thing would be to store the Status that the Marketplace has for the given claim.
-
Marketplaces usually hold a separate ID for these Claims so we would need to be able to store it whenever available.
-
Some Marketplaces would require a reason for an Action to be provided. We need to have a way of adding this Reason whenever required.
-
Marketplaces usually would store what was the Reason for the initiation of the Claim. This is a separate Reason from the Action Reason. We need to be able to store this Marketplace claim reason whenever available.
-
As some times we would need to be exporting these we need a flag to mark these Claims as Exported.
Claim row:
The claim row represents a specific quantity of specific SKU and is associated with order item line. In the claim row we must have he ability to assign separate tracking to each separate quantity so that is why we have against each order item line id, according tracking number.
Case for bundle SKU’s on order:
As we have bundle and component SKU’s we need to define a way of knowing for the specific claim row is it associated with a bundle SKU or with component SKU or with simple one that is neither bundle nor component.
We need to have this definition on claim row in order to be able do decide which rows we would like to export if needed.
Solution:
The information in claim row will be stored only for the Bundle SKU. The exports will be having the logic of getting the Component SKU within them when needed.