Marketplaces / Noon v1 Technical Scope / Noon Get Cancellations

Noon Get Cancellations

Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)

Version Date Created / Updated Notes
v1.0 01/09/2023 Hristiyan First publish
v1.1 18/09/2023 Hristiyan Added logic on what to do once we process the files
v1.2 19/09/2023 Hristiyan Added logic for not changing the order status to cancelled.
v1.3 07/03/2024 Milen Changed the field mapping logic in ‘Get Cancellations’
v1.4 01/07/2025 Hristiyan Mapping changes

The cancellations will be sent as a credit note in a .csv file format in a specific folder on an sFTP. For this we want to use the FTP Credentials table where we input the details and for the get cancellations we want to control this via an FTP path labelled ‘Get Cancellations’

The file name format is : vat_creditnote_XXXXX_YYYMMDD.csv

Delimiter is comma (,)

vat_creditnote_13059_20221203.csv

Noon only supports single quantity line item based entries. Therefore even if a multi-quantity order was refunded, Noon will put each item as a separate item number with the same credit note but with a unique item number. Thus we need to group by creditnote_nr when creating the refund and add all products associated with the creditnote_nr.

<v1.3> We need to use item_nr and search for it in Order Item Line > Marketplace Order Item ID field. If we have a match, we are to create a refund for the selected product/quantity. We still need to group by creditnote_nr when creating the refunds if there are more than 1 different item_nr within the same order (source_document) </v1.3>

Mapping : Please note N/A means we exclude it and not map to anything

<v1.4> Please note that since we are now creating the file, there are some headers which are removed from the mapping below and some that are with changed names, all changed are tagged, the removed ones are just removed from the table below. </v1.4>

Noon csv header name Notes Hemi Mapping Comment
partner_sku Order Refund Row > SKU
sku N/A
item_nr <v1.3>Order Item Line > Marketplace Order Item ID</v1.3>
id_partner N/A
marketplace N/A
<v1.4> order_nr </v1.4> This is the marketplace order id N/A
creditnote_nr This will be the refund ID Order Payment>Transaction ID Note! This will be for Order Payment with type Refund . We also need to check if we have more than one row in the file with the same creditnote_nr and then create a combined refund for all records associated with this creditnote_nr
<v1.4> returned_date </v1.4> Order Payment > Payment Date The format of the date is in DD/MM/YYYY format. We need to convert it to unix and since there is no time in the provided date, we want to always import the time of 00:00:00.
country_code N/A
<v1.4> seller_price </v1.4> Order Refund Row > Amount

Please note this should create the Order Payment in Hemi with: Order Payment > Type = Refund Order Payment > Status = Completed Order Payment > Process by MP = NoOrder Payment > Refund Type = Full Refund, Partial Refund (depends on the line items)

Also there will be no updates on credit notes so if we receive the same records in two separate credit notes, we should do nothing and skip it the second time we receive it.

All other fields, triggers and validation are as per our standard abstraction. Refunds send general logic

<v1.2> Due to client’s requirements we should NOT change the Orders > Status to ‘Cancelled’ but we should keep it as ‘Shipped’ instead. This should be valid both for partial or full cancellations so basically in no case we should change the status.</v1.2>

<v1.1> After successfully processing the csv file, we want to move it into a Processed folder if we managed to process all orders in the file. If one or all orders in the file have failed to be imported successfully, we want to import whatever we can, but move the whole file into an Error folder. </v1.1>

Is this article helpful?
0 0 0