Status Updates
This document will cover both sections - Very to Supplier and Supplier to Very
Version | Created/Updated by | Notes |
---|---|---|
1.0 | Danail Deltchev | Initially Created |
1.1 | Beatris Bunova | Changed reselect indicator mapping |
1.2 | Danail Deltchev | Clarification on file extension added as a Note (.xml) |
1.3 | Danail Deltchev | Change in the mapping of Supplier to Very “Supplier code” - to reflect the correct value we should be picking in the docs as well |
1.4 | Danail Deltchev | Change in the mapping of Order Number in Supplier to Very status update |
Change in the “Sender Address” mapping in Supplier to Very status update | ||
1.5 | Danail Deltchev | Supplier code is not a 4 digit value but a 4 alphanumeric characters field both for payload and filename |
1.6 | Milen Markov | File extension changes (Very to Supplier) |
1.7 | Milen Markov | Create refund rows after accepting a cancellation request |
Very to Supplier
Post order creation we are expecting to receive order status updates connected with cancellations from Very. Those can be the following:
Data Type | Status Code | Description | WAP Notes |
---|---|---|---|
15 | 16 | Cancellation Requested | Should Create a Claim in our system |
15 | 17 | Cancelled (as result of auto cancellation of NEW Order or Guaranteed Cancellation) | Should mark the mentioned order as “Cancelled” |
20 | 17 | Cancelled (as result of The Very Group accepting the supplier’s Reselect request) | Should mark the mentioned order as “Cancelled” |
20 | 14 | Cancellation Request Declined | A claim created by Hemi should be updated to Declined |
Field Names and Specifics
Field Name | Format | Node | Comments | WAP Mapping | WAP Notes |
---|---|---|---|---|---|
Content | **** | /CONTENT | **** | N/A | |
Sender Address | X(5) | /STATUSES/SENDERADDRESS | “R0200” | N/A | |
Data Type | 99 | /STATUSES/DATATYPE | See values below | N/A | |
Cancel / Reselect Indicator | X(1) | /STATUSES/REVISIONNO | “C” = Cancellation |
“R” = Reselect Tag may also be blank or not present. See * below. | Order Claim > Type (Cancel) | In case we are creating a claim | | Guaranteed Request | X(1) | /STATUSES/STATUS/GUARANTEED | “N” or “Y”. See * below. (This field is only sent in files where Cancel / Reselect Indicator = “C”) | Order Claim > Marketplace Reason | In case we are creating a claim | | Status | 9(4) | /STATUSES/STATUS/STATUSCODE | See values below | N/A | | | Supplier Code | A999 | /STATUSES/STATUS/ORDER/SUPPLIER/BUYERREFERENCE | | N/A | | | Order Number | X(8) | /STATUSES/STATUS/ORDER/ORDERNUMBER | | Order Claim > Marketplace ID | In case we are creating a claim | | Order Date | YYYY-MM-DDThh:mm:ss | /STATUSES/STATUS/ORDER/ORDERDATE | | N/A | | | Status Date | YYYY-MM-DDThh:mm:ss | /STATUSES/STATUS/DATE | | Order Claim > Marketplace Date | In case we are creating a claim | | Status Time | hhmmss | /STATUSES/STATUS/TIME | Tag may also be blank or not present. See below. | N/A | |
- If we have blank fields (especially for “/STATUSES/REVISIONNO“) we should treat the request like we’ve received it with value “C” - in other words just create the request and set the Type to “cancel”
Example XML:
Actions:
- In case of status code 16 we need to create a new claim. This claim needs to:
- Map the above mentioned fields and also set:
- Initiated by = Marketplace
- Marketplace status = pending - to be able to track what will be the outcome of this Claim
- Map the claim rows for the corresponding Order ID associated products
- Create on Account Very a section that allows for automatic decision making. Based on a selected value it should store a value in Action and potentially Status to automate the Acceptance or Rejection. Values and action from the in Account Very
- Empty value (Default) - manual processing of claims, nothing to store
- Accept - automatically put Action to “Accept” and Status to Pending to accept the marketplace claim
- Reject - automatically put Action to “Reject” and Status to Pending to reject the marketplace claim
- Last but not least we need to do some validations:
- If a claim already exists for the same order ID and Order Error should be stored
- If a Cancellation Request is being made for an order that is Cancelled an Order Error should be stored
- Map the above mentioned fields and also set:
- In case of status code 17 we need to update an existing claim that is still pending/sent or in case there is no claim create new claim with all mapped fields plus Initiated by = Marketplace, Marketplace Status = completed and Status = completed. Furthermore every order_item_line affected should receive an mp_status “cancelled” update to identify that those have been affected
Last but not least in case of storing a new completed claim or marking a claim we’ve initiated as Accepted we should also create an order payment record + refund rows or update an existing one that has originally created the claim by us.
- In case we are creating a new claim, not existing in the DB we need to create an order payment with:
- Payment date - same as claim Marketplace date
- Transaction ID - same as claim Marketplace ID
- Total - the total value of the affected products (count quantity as well)
- Type - refund
- Status - completed
- Refund type - partial
- Refund note - Claim ID: (text included)
- Refund Rows for each SKU with its value
- In case we are updating an existing claim as Accepted by the MP we need to update the status of the refund based on a connection (either via the Refund note where we should store the Claim ID or a proposed by Devs method)
- In case we are creating a new claim, not existing in the DB we need to create an order payment with:
- In case of status code 14 we need to update an existing claim that it has been rejected, complete it, fill the marketplace date as per the mapping above and close it off. Additionally we need to go to the originating payment record and update the refund to error (and set payment date to be same as marketplace date on the claim) as realistically it has not been processed on the MP (see right above for connection options to payment record)
File Name and Limitations:
- File name from Very is to be in the following naming convention: “nnnn.stupd.mmddyy.” where ‘nnnn’ is the 4 alphanumeric supplier code, mmddyy is the month day and year the transaction was produced and is an incrementing number for each file type per day
- No specific file limitations are to be considered
<v1.6> Note: Expectation as per conversations and documentation is that files will be XMLs or with no extension at all so we should aim at working with files that are either .xml or with no extension. </v1.6>
Supplier to Very
Once we’ve stored the order in our system we need to track its progress via status updates. The updates we can send are the following:
Data Type | Status Code | Description | WAP Notes |
---|---|---|---|
30 | 11 | Acknowledged | Status we should send for every order we successfully store in our system |
30 | 15 | Held (Amend Delivery Date) | N/A |
30 | 40 | Dispatched | Marking an order as shipped. Everything that is Acknowledged but not Cancelled in an order marked for dispatch should be sent as an update to Very |
30 | 90 | Stock Allocated | N/A |
30 | 91 | In Production | N/A |
30 | 92 | Reselect (Out of Stock or Decline) / Cancellation Request | To be added as part of the Reasons list so when someone is submitting a Refund for a product we can decide which code to send |
30 | 93 | Printed | N/A |
30 | 94 | Reprinted | N/A |
30 | 97 | Reselect (Other Reasons) / Cancellation Request | To be added as part of the Reasons list so when someone is submitting a Refund for a product we can decide which code to send |
35 | 14 | Cancellation Request declined | This is the way for us to Reject a Cancellation request submitted by the MP |
35 | 17 | Cancelled | This is the way for us to Accept a Cancellation Request submitted by the MP |
Field names and Specifics:
Field Name | Format | Node | Comments | WAP Mapping | WAP Notes |
---|---|---|---|---|---|
Sender Address | X(5) | /STATUSES/SENDERADDRESS | “R0200” | “R0200” | Hardcoded please |
Data Type | 99 | /STATUSES/DATATYPE | See values below | N/A | 30 OR 35 |
Based on the Status code we are sending | |||||
Status Date | YYYY-MM-DDThh:mm:ss | /STATUSES/STATUS/DATE | N/A | Date of the sending of the status. It has to be with 0:00 time | |
Status Time | hh:mm:ss | /STATUSES/STATUS/TIME | N/A | Time of the sending | |
Status Code | 9(4) | /STATUSES/STATUS/STATUSCODE | See values below | N/A | Based on the action we are performing (please see below) |
Order Number | X(8) | /STATUSES/STATUS/ORDER/ORDERNUMBER | Order Item > Order Item Line Id | For MO orders sending any status update for only one Order ID should update the whole MO order (same as for the Label request) | |
Order Date | YYYY-MM-DDThh:mm:ss | /STATUSES/STATUS/ORDER/ORDERDATE | Orders > Order Created Time | ||
Supplier Code | A999 | /STATUSES/STATUS/ORDER/SUPPLIER/BUYERREFERENCE | Account Seller > External Seller ID | It is supposed to be our supplier code and this way we can handle specific values for sellers on different Accounts | |
Held Date | YYYY-MM-DDThh:mm:ss | /STATUSES/STATUS/ORDER/HELDDATE | Status 15 only | N/A |
Example XML:
Actions:
- Acknowledgement - every order that we successfully record in our system we should automatically acknowledge back to Very. This, if successfully creates a file, should also put the order_item_line marketplace_status fields to “acknowledged” so we can have a proper traceability. As per the orders download documents every recorded order should be on a Ready for Shipping status with said marketplace_status filed on “pending”. This should also be the queue for this function to send its status update
- Dispatch - every order in Hemisphere that is marked with update_shipping_pending we should try and send a dispatch status update to Very. As there are the options for multiple orders in one Hemisphere order we should track what is still “acknowledged” and if there is anything that is “cancelled” and send a “dispatch” status update only for the “acknowledged” orders. Once a file has been successfully produced the order tool status should be moved to Dispatched as well.
- Request Cancellation - When someone creates a Refund for an order the following steps should be made
- If the refund is NOT for a full order it should be marked as Error with the corresponding message
- If the refund is for something that is already dispatched or cancelled it should be marked as Error with the corresponding message
- If there is no reason the refund should be marked as Error with the corresponding message
- If the refund is passing validations a new Claim record should be stored with the following parameters:
- Marketplace Date - empty, to be filled in when reading the Request response (please see “Very to Supplier > Actions > In case of status 17 code OR In case of status 14”)
- Type - Cancel
- Initiated by - Seller
- Status - pending (so it can be picked and sent)
- Marketplace ID - Order ID (the more specific one that we are storing on order_item level in case it is a multi order)
- Action Reason - Out of Stock or Other based on the refund reason
- Store all needed Claim rows with their respective order_line_ids
- Once a claim is successfully created we need to store its ID (for future reference) in Refund Note and mark the Refund as Sent
- Accept / Reject Cancellation - On a claim that is created as pending from the marketplace based on a taken action - Accept or Reject - we need to send the corresponding status update to Very
- <v1.7>If the claim is accepted, we need to create a refund row as well, containing the products that we are accepting the cancellation for. As we don’t have a response from Blujay on this flow we treat it as “Successfully Accepted” at the moment of successfully finishing the flow on our end (exporting and storing the file on the designated Blujay integration ftp). Same should be treated as for the Reject step too - if successfully exported we should treat it as done and follow the final steps for the claim as “completed” communication flow</v1.7>
File name and Limitations:
- The only thing specific for the naming convention is that every file needs to be unique. Proposed naming is “OSU_toVery{timestamp}.xml“
- File limit is set to 500kb which allows around 1500 Status Updates at a time. Proposed Limit is 1200 on our side
- An order ID must be present only once in a file. Meaning we should not be sending multiple different statuses for an order at a time. Based on our logic we are not expecting any such to happen still a validation will be good
- Again if a status for Acknowledgement or Despatch needs to be sent only one of the OrderIDs in that MO should be enough. Very will treat all associated orders with the same status. Cancel updates are to be on an order by order basis even within the MO