Marketplaces / NordStrom Technical Scope / NordStrom Order management / NordStrom Get Orders

NordStrom Get Orders

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 Name Applied changes
v1.0 29.05.2025 Bogomil First publish

The specific for MIRAKL type of integrations in regards to orders flow is that we need to have a single cron which download the orders in Hemi the and also update the statuses and all related orders information to already stored orders.

Sales Tax Group Marketplace VAT Group Internal VAT Group
Orders >Total Sales Tax Orders > Total Marketplace VAT Orders > Total VAT
Orders >Total Shipping Sales Tax Orders > Total Shipping Marketplace VAT Orders > Total Shipping VAT
Product In Order > Item Sales Tax Price Product in Order > Marketplace VAT Item Price Product In Order > Vat Item Price
Product In Order > Sales Tax Percent Product in Order > Marketplace VAT Percent Product In Order > Vat Percent
Product In Order > Item Shipping Cost Sales Tax Product in Order > Marketplace VAT Item Shipping Cost Product In Order > Vat Item Shipping Cost
  • Get New Orders

To download orders, we will use GET OR11 - List orders. The first run will check for new orders in the last 90 days and afterwards we need to get the date from last_date_run table and filter orders using parameter:

start_date: {last_date_run - 1 hours} date format: 2022-03-25T11:02:04Z

API Call: GET OR11 - List orders

Docs: https://help.mirakl.net/help/api-doc/seller/mmp.html#OR11

{
    "orders": [
      {
        "acceptance_decision_date": "2019-04-02T14:56:01Z",
        "can_cancel": false,
        "can_shop_ship": false,
        "channel": {
          "code": "US",
          "label": "Website US"
        },
        "commercial_id": "Order_00010",
        "created_date": "2019-04-02T14:18:43Z",
        "currency_iso_code": "USD",
        "customer": {
          "accounting_contact": {
            "customer_id": "Customer_id_003",
            "firstname": "Thomas",
            "lastname": "Anderson",
            "locale": "en_US"
          },
          "billing_address": {
            "city": "New York City",
            "civility": "M",
            "country": "USA",
            "country_iso_code": "USA",
            "firstname": "smith",
            "lastname": "Taylor",
            "company": "LIMARK Company",
            "state": "Manhattan",
            "street_1": "113 MacDougal Street",
            "street_2": "1st floor",
            "zip_code": "NY 10012"
          },
          "civility": "M",
          "customer_id": "Customer_id_001",
          "delivery_contact": {
            "customer_id": "Customer_id_002",
            "firstname": "Stella",
            "lastname": "Lettiere",
            "locale": "en_US"
          },
          "firstname": "Smith",
          "lastname": "Taylor",
          "locale": "en_US",
          "organization": {
            "address": {
              "city": "New York",
              "country_iso_code": "USA",
              "state": "Manhattan",
              "street_1": "113 MacDougal Street",
              "street_2": "1st floor",
              "zip_code": "NY 10012"
            },
            "identification_number": "982837446",
            "name": "Limark Company Inc.",
            "organization_id": "organization_id_001",
            "tax_identification_number": "96-25472919"
          },
          "shipping_address": {
            "additional_info": "One article per box",
            "city": "New York",
            "civility": "M",
            "company": "LIMARK Company",
            "country": "USA",
            "country_iso_code": "USA",
            "firstname": "Smith",
            "lastname": "Taylor",
            "state": "Manhattan",
            "street_1": "113 MacDougal Street",
            "street_2": "1st floor",
            "zip_code": "NY 10012"
          }
        },
        "customer_debited_date": "2019-04-02T14:58:22.460Z",
        "customer_notification_email": "notification+ec1riop21ju4rfynl0helvzou.e0z0r7cj2@notification.mirakl.net",
        "delivery_date": {
          "earliest": "2019-09-02T08:07:22.326Z",
          "latest": "2019-09-03T08:07:22.326Z"
        },
        "fully_refunded": false,
        "has_customer_message": false,
        "has_incident": false,
        "has_invoice": false,
        "invoice_details": {
          "document_details": [
            {
              "format": "PDF"
            },
            {
              "format": "cXML"
            }
          ],
          "payment_terms": {
            "days": 10,
            "type": "NET"
          }
        },
        "last_updated_date": "2019-04-02T14:59:58Z",
        "leadtime_to_ship": 5,
        "order_additional_fields": [],
        "order_id": "Order_00010-A",
        "order_lines": [
          {
            "can_refund": true,
            "cancelations": [
              {
                  "amount": 12.34,
                  "amount_breakdown": {
                      "parts": [
                          {
                              "amount": 12.34,
                              "commissionable": true,
                              "debitable_from_customer": true,
                              "payable_to_shop": true
                          }
                      ]
                  },
                  "commission_amount": 2.38,
                  "commission_taxes": [],
                  "commission_total_amount": 2.38,
                  "created_date": "2022-08-04T09:37:58Z",
                  "eco_contributions": [],
                  "id": "1122",
                  "purchase_information": {
                      "purchase_commission_on_price": 2.16,
                      "purchase_commission_on_shipping": 0.22,
                      "purchase_price": 10.18,
                      "purchase_shipping_price": 1.01
                  },
                  "quantity": 0,
                  "reason_code": "34",
                  "shipping_amount": 1.23,
                  "shipping_amount_breakdown": {
                      "parts": [
                          {
                              "amount": 1.23,
                              "commissionable": true,
                              "debitable_from_customer": true,
                              "payable_to_shop": true
                          }
                      ]
                  },
                  "shipping_taxes": [
                      {
                          "amount": 1.54,
                          "amount_breakdown": {
                              "parts": [
                                  {
                                      "amount": 1.54,
                                      "commissionable": true,
                                      "debitable_from_customer": true,
                                      "payable_to_shop": false
                                  }
                              ]
                          },
                          "code": "tax1",
                          "purchase_tax": {
                              "purchase_amount": 1.27,
                              "purchase_rate": 7.5000
                          },
                          "rate": 17.5000
                      },
                      {
                          "amount": 1.54,
                          "amount_breakdown": {
                              "parts": [
                                  {
                                      "amount": 1.54,
                                      "commissionable": false,
                                      "debitable_from_customer": true,
                                      "payable_to_shop": false
                                  }
                              ]
                          },
                          "code": "tax2",
                          "purchase_tax": {
                              "purchase_amount": 1.27,
                              "purchase_rate": 7.5000
                          },
                          "rate": 17.5000
                      }
                  ],
                  "taxes": [
                      {
                          "amount": 0.75,
                          "amount_breakdown": {
                              "parts": [
                                  {
                                      "amount": 0.75,
                                      "commissionable": true,
                                      "debitable_from_customer": true,
                                      "payable_to_shop": false
                                  }
                              ]
                          },
                          "code": "tax1",
                          "purchase_tax": {
                              "purchase_amount": 0.62,
                              "purchase_rate": 7.5000
                          },
                          "rate": 17.5000
                      },
                      {
                          "amount": 0.75,
                          "amount_breakdown": {
                              "parts": [
                                  {
                                      "amount": 0.75,
                                      "commissionable": false,
                                      "debitable_from_customer": true,
                                      "payable_to_shop": false
                                  }
                              ]
                          },
                          "code": "tax2",
                          "purchase_tax": {
                              "purchase_amount": 0.62,
                              "purchase_rate": 7.5000
                          },
                          "rate": 17.5000
                      }
                  ]
              }],
            "category_code": "5110114",
            "category_label": "Coffee Machines",
            "commission_fee": 21.3,
            "commission_taxes": [
              {
                "amount": 0,
                "code": "TAXZERO",
                "rate": 0
              }
            ],
            "created_date": "2019-04-02T14:18:43Z",
            "debited_date": "2019-04-02T14:58:22Z",
            "description": null,
            "eco_contributions": [
              {
                "epr_category_code": "FR_DEE",
                "producer_id": "EPR_PRODUCER_ID",
                "producer_id_owner": "SELLER",
                "total_amount": 6,
                "unit_amount": 2
              }
            ],
            "last_updated_date": "2019-04-02T14:59:58Z",
            "offer_id": 2130,
            "offer_sku": "S2000",
            "offer_state_code": "11",
            "order_line_additional_fields": [
              {
                "code": "delivery-countries",
                "type": "MULTIPLE_VALUES_LIST",
                "value": [
                  "USA"
                ]
              }
            ],
            "order_line_id": "Order_00010-A-1",
            "order_line_index": 1,
            "order_line_state": "RECEIVED",
            "order_line_state_reason_code": null,
            "order_line_state_reason_label": null,
            "price": 165,
            "price_additional_info": null,
            "price_unit": 55,
            "origin_unit_price": 60,
            "product_medias": [
              {
                "media_url": "/media/product/image/57b58b2e-8849-4d8d-9072-0aa33d314e5c",
                "mime_type": "JPEG",
                "type": "MEDIUM"
              },
              {
                "media_url": "/media/product/image/8bc8241d-0747-4891-bb2e-881202f5465a",
                "mime_type": "JPEG",
                "type": "LARGE"
              },
              {
                "media_url": "/media/product/image/d3fd1d4e-a943-4df0-8878-3343ba139dd9",
                "mime_type": "JPEG",
                "type": "SMALL"
              }
            ],
            "product_sku": "MKP100000000037254",
            "product_title": "Breville Cafe Roma Stainless Espresso/Cappuccino Machine - ESP8C",
            "promotions": [],
            "purchase_information": {
                  "purchase_commission_on_price": 25.45,
                  "purchase_commission_on_shipping": 1.12,
                  "purchase_price": 127.21,
                  "purchase_shipping_price": 5.65,
                  "purchase_unit_price": 137.39
            },
            "quantity": 3,
            "received_date": "2019-04-02T14:59:58Z",
            "refunds": [
              {
                  "amount": 6.82,
                  "commission_amount": 1.69,
                  "commission_tax_amount": 0,
                  "commission_taxes": [
                  {
                    "amount": 0,
                    "code": "TAXZERO"
                  }],
                  "commission_total_amount": 1.69,
                  "created_date": "2022-08-04T09:40:41Z",
                  "eco_contributions": [],
                  "id": "1106",
                  "purchase_information": {
                      "purchase_commission_on_price": 1.34,
                      "purchase_commission_on_shipping": 0.35,
                      "purchase_price": 5.48,
                      "purchase_shipping_price": 1.44
                  },
                  "quantity": 0,
                  "reason_code": "19",
                  "shipping_amount": 1.79,
                  "shipping_taxes": [
                      {
                          "amount": 2.24,
                          "code": "tax1",
                          "purchase_tax": {
                              "purchase_amount": 1.80,
                              "purchase_rate": 1.5000
                          },
                          "rate": 17.5000
                      },
                      {
                          "amount": 2.24,
                          "code": "tax2",
                          "purchase_tax": {
                              "purchase_amount": 1.80,
                              "purchase_rate": 1.5000
                          },
                          "rate": 17.5000
                      }
                  ],
                  "state": "WAITING_REFUND_PAYMENT",
                  "taxes": [
                      {
                          "amount": 0.41,
                          "code": "tax1",
                          "purchase_tax": {
                              "purchase_amount": 0.33,
                              "purchase_rate": 1.5000
                          },
                          "rate": 17.5000
                      },
                      {
                          "amount": 0.41,
                          "code": "tax2",
                          "purchase_tax": {
                              "purchase_amount": 0.33,
                              "purchase_rate": 1.5000
                          },
                          "rate": 17.5000
                      }
                  ]
              }],
            "shipped_date": "2019-04-02T14:58:39Z",
            "shipping_from": {
              "address": {
                "city": "New York City",
                "country_iso_code": "USA",
                "state": "New York",
                "street_1": "10E 40th Street",
                "street_2": "14th floor",
                "zip_code": "10016"
              }
            },
            "shipping_price": 8,
            "shipping_taxes": [
              {
                "amount": 10,
                "code": "tax1",
                "purchase_tax": {
                  "purchase_amount": 7.06
                },
                "rate": 17.5000
              },
              {
                "amount": 10,
                "code": "tax2",
                "purchase_tax": {
                  "purchase_amount": 7.06
                },
                "tax_calculation_rule": "PROPORTIONAL_TO_AMOUNT"
              }
            ],
            "taxes": [
              {
                "amount": 10,
                "origin_unit_amount": 2,
                "code": "tax1",
                "purchase_tax": {
                  "purchase_amount": 7.71
                },
                "rate": 17.5000,
                "tax_calculation_rule": "NONE"
              },
              {
                "amount": 10,
                "origin_unit_amount": 2,
                "code": "tax2",
                "purchase_tax": {
                  "purchase_amount": 7.71
                }
              }
            ],
            "total_commission": 21.3,
            "total_price": 173
          }
        ],
        "order_state": "RECEIVED",
        "order_state_reason_code": null,
        "order_state_reason_label": null,
        "order_tax_mode": "TAX_EXCLUDED",
        "payment_type": "Visa",
        "payment_workflow": "PAY_ON_ACCEPTANCE",
        "price": 165,
        "promotions": {
          "applied_promotions": [],
          "total_deduced_amount": 0
        },
        "quote_id": null,
        "references": {
          "order_reference_for_customer": "ref_customer",
          "order_reference_for_seller": "ref_seller"
        },
        "shipping_carrier_code": "UPS",
        "shipping_company": "UPS",
        "shipping_deadline": "2019-09-01T08:07:22.326Z",
        "shipping_price": 8,
        "shipping_pudo_id": "C1039",
        "shipping_tracking": "2344",
        "shipping_tracking_url": "https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=2344",
        "shipping_type_code": "STD",
        "shipping_type_label": "Standard",
        "shipping_zone_code": "INT1",
        "shipping_zone_label": "International 1",
        "total_commission": 21.3,
        "total_price": 173,
        "transaction_date": "2019-06-25T07:42:21.215Z",
        "transaction_number": "TR_MIR-PHHV83UB",
        "fulfillment": {
          "center": {
            "code": "FULFILLMENT_CENTER_CODE"
          }
        },
        "customer_directly_pays_seller": false
      }
    ],
    "total_count": 1
  }

Mapping:

MIRAKL Field MIRAKL Notes Hemi Field Hemi note
1 orders List of orders
2 acceptance_decision_date The date where the shop decided to accept or refuse the order. Null when the order was automatically refused or accepted.
date-time N/A
3 can_cancel Indicate if the order can be cancelled.
boolean N/A
4 can_shop_ship Indicates if shops can or cannot ship orders
boolean N/A
5 channel The channel of the commercial's order
6 code Channel code N/A
7 label Channel label N/A
8 commercial_id Commercial order's identifier N/A
9 created_date Order's creation date
2022-08-25T11:06:29Z Order > Order Created Time
10 currency_iso_code Shop's currency (ISO format)
One of: AED, ARS, AUD, BGN, BHD, BRL, CAD, CHF, CLP, CNY, COP, CZK, DKK, EGP, EUR, GBP, HKD, HRK, HUF, ILS, INR, JOD, JPY, KES, KRW, KWD, LKR, MXN, MYR, NGN, NOK, NZD, OMR, PEN, PHP, PKR, PLN, RON, RSD, RUB, SAR, SEK, SGD, TND, TRY, THB, TWD, UAH, USD, UYU, VND, ZAR Order > Order Currency
11 customer Information of the customer who ordered
12 billing_address Customer’s billing address
13 city Address city Orders > Billing City Name
14 company Company of the person associated with the address Orders >Billing Details > Company Name
15 country Address country Orders > Billing Country Name
16 country_iso_code Orders > Billing Country Code As we store in Hemi 2 letter code, we should convert the value from MIRAKL (3letted code) into 2 letter code and store it in Hemi.
17 firstname First name of the person associated with the address Orders > Billing Name Concatenate with “lastname” with a single space between them
18 lastname Last name of the person associated with the address Orders > Billing Name Concatenate with “firstname” with a single space between them
19 phone Phone number of the person Orders > Billing Phone
20 company Company name Orders > Company Name billing_company_name under Billing Tab
21 state Address state Orders > Billing State Province
22 street_1 First information line of the address street Orders > Billing Street 1
23 street_2 Second information line of the address street Orders > Billing Street 2
24 zip_code Address zip code Orders > Billing Postal Code
25 civility Civility of the person associated with the address N/A
26 customer_id Customer's identifier Order > Buyer User ID
27 firstname Customer contact's firstname N/A
28 lastname Customer contact's lastname N/A
29 locale Customer contact's locale N/A
30 shipping_address Customer's Shipping address
31 additional_info Additional information for the shipping address N/A
32 city Address city Orders > Shipping City
33 company Company of the person associated with the address Orders > Company Name shipping_company_name under Shipping Tab
34 country Address country Orders > Shipping Country Name
35 country_iso_code Orders > Shipping Country Code As we store in Hemi 2 letter code, we should convert the value from MIRAKL (3letted code) into 2 letter code and store it in Hemi.
36 firstname First name of the person associated with the address Orders > Shipping Buyer Name Concatenate with “lastname” with a single space between them
37 lastname Last name of the person associated with the address Orders > Shipping Buyer Name Concatenate with “firstname” with a single space between them
38 phone Phone number of the person Orders > Shipping Phone
39 state Orders > Shipping State Province
40 street_1 First information line of the address street Orders > Shipping Street 1
41 street_2 Second information line of the address street Orders > Shipping Street 2
42 zip_code Address zip code Orders > Shipping Postal Code
43 customer_debited_date The payment's date of the order by the customer Orders > Order Paid Time We will store UNIX format in Hemi but we need to display Human readable format into the UI
44 customer_notification_email Anonymized customer email usable for notifications that do not expect an answer Order > Buyer mail
45 delivery_date Expected order delivery date Orders > Delivery By Date
46 fulfillment N/A
47 center N/A
48 code N/A
49 fully_refunded Refund information N/A
50 has_customer_message Indicate if the customer has sent a message related to this order N/A
51 has_incident Indicate if order has incident on at least one order line N/A
52 has_invoice Is an invoice available for this order N/A
53 last_updated_date Order's last updated date N/A
54 leadtime_to_ship Order's lead time to ship, in calendar days.
Deprecated N/A
55 order_additional_fields Order's additional fields N/A
56 order_id Order's identifier Order >Marketplace Order ID
57 order_lines Order lines
58 can_refund Indicate whether the order line full amount can be refunded N/A
59 cancelations List of the cancellations
60 amount Refund's amount Order Refund row > Amount This applies for the row with type “item“
61 amount_breakdown N/A
62 parts N/A
63 amount N/A
64 commissionable N/A
65 debitable_from_customer N/A
66 payable_to_shop N/A
67 commission_amount Refund's commission amount N/A
68 commission_tax_amount Refund's commission taxes N/A
69 commission_taxes N/A
70 commission_total_amount N/A
71 created_date Refund's creation date Order Refund row > Payment Date
72 debited_date N/A
73 description N/A
74 eco_contributions N/A
75 id Refund's id Order Payment > Transaction ID When we are sending cancellation we group the ids into a single refund row but when we are downloading them every id will be a separate payment row type refund.

We need to have the same logic also when we are downloading refund from MIRAKL and compare it to the transaction id. e.g: Transaction id = 2346-3563-1563 This means there are 3 refunds on the order and we store then in one payment row with 3 refund rows however the transaction id is constructed with all MIRAKL refund ids for the order “2346“, “3563“, “1563“ so when we are downloading the order we need to compare all refund ids. | | 76 | | | | purchase_information | | | | | | N/A | | | 77 | | | | | purchase_commission_on_price | | | | | N/A | | | 78 | | | | | purchase_commission_on_shipping | | | | | N/A | | | 79 | | | | | purchase_price | | | | | N/A | | | 80 | | | | | purchase_shipping_price | | | | | N/A | | | 81 | | | | quantity | | | | | The quantity of products canceled (This quantity is informative only) | N/A | Based on the details added in the refund row. | | 82 | | | | reason_code | | | | | Reason's code of the refund | Order Payment > Reason | Based on the ID we need to store the relevant reason | | 83 | | | | shipping_amount | | | | | Refund's shipping amount | Order Refund Row > Amount | This applies for the row with type “shipping“ | | 84 | | | | shipping_amount_breakdown | | | | | | N/A | | | 85 | | | | | parts | | | | | N/A | | | 86 | | | | | | amount | | | | | | | 87 | | | | | | commissionable | | | | N/A | | | 88 | | | | | | debitable_from_customer | | | | N/A | | | 89 | | | | | | payable_to_shop | | | | N/A | | | 90 | | | | shipping_taxes | | | | | The taxes on the shipping price | | | | 91 | | | | | amount | | | | Tax amount | <v1.2>Product In Order > Marketplace VAT Item Price</v1.2> | | | 92 | | | | | | amount_breakdown | | | | N/A | | | 93 | | | | | | | parts | | | N/A | | | 94 | | | | | | | | amount | | N/A | | | 95 | | | | | | | | commissionable | | N/A | | | 96 | | | | | | | | debitable_from_customer | | N/A | | | 97 | | | | | | | | payable_to_shop | | N/A | | | 98 | | | | | | code | | | | N/A | | | 99 | | | | | | purchase_tax | | | | N/A | | | 100 | | | | | | | purchase_amount | | | N/A | | | 101 | | | | | | | purchase_rate | | | N/A | | | 102 | | | | | | rate | | | | N/A | | | 103 | | | | | taxes | | | | | | | | 104 | | | | | | amount | | | | <v1.2>Product In Order >Marketplace VAT Item Shipping Cost </v1.2> | This amount is per single quantity so we just want to store it. | | 105 | | | | | | amount_breakdown | | | | N/A | | | 106 | | | | | | | parts | | | N/A | | | 107 | | | | | | | | amount | | N/A | | | 108 | | | | | | | | commissionable | | N/A | | | 109 | | | | | | | | debitable_from_customer | | N/A | | | 110 | | | | | | | | payable_to_shop | | N/A | | | 111 | | | | | | code | | | | N/A | | | 112 | | | | | | purchase_tax | | | | N/A | | | 113 | | | | | | | purchase_amount | | | N/A | | | 114 | | | | | | | purchase_rate | | | N/A | | | 115 | | | | | | rate | | | | N/A | | | 116 | | | category_code | | | | | | Category code of the product associated with the order line | N/A | | | 117 | | | category_label | | | | | | Category label of the product associated with the order line | N/A | | | 118 | | | commission_fee | | | | | | Order line's commission fee | Orders > Marketplace Fee | We need to sum all order line commissions and store them on order level | | 119 | | | commission_rate_vat | | | | | | Order line's commission rate vat | Orders > Marketplace VAT | | | 120 | | | commission_taxes | | | | | | Commission taxes | N/A | | | 121 | | | | amount | | | | | | N/A | | | 122 | | | | code | | | | | | N/A | | | 123 | | | | rate | | | | | | N/A | | | 124 | | | commission_vat | | | | | | | | | | 125 | | | created_date | | | | | | Order line's creation date | N/A | | | 126 | | | debited_date | | | | | | Order line's debited date | N/A | | | 127 | | | description | | | | | | Order line's description | N/A | | | 128 | | | eco_contributions | | | | | | Eco Contributions | N/A | | | 129 | | | | epr_category_code | | | | | | N/A | | | 130 | | | | producer_id | | | | | | N/A | | | 131 | | | | producer_id_owner | | | | | | N/A | | | 132 | | | | total_amount | | | | | | N/A | | | 133 | | | | unit_amount | | | | | | N/A | | | 134 | | | last_updated_date | | | | | | Order line's last updated date | N/A | | | 135 | | | offer_id | | | | | | Associated offer's id | Product in Order > Channel Item ID | | | 136 | | | offer_sku | | | | | | Associated offer sku (this is the sku of the offer defined by the shop) | Product in Order > SKU | | | 137 | | | offer_state_code | | | | | | State of the offer associated with the order line | N/A | | | 138 | | | order_line_additional_fields | | | | | | List of additional fields | N/A | | | 139 | | | | code | | | | | | N/A | | | 140 | | | | type | | | | | | N/A | | | 141 | | | | value | | | | | | N/A | | | 142 | | | order_line_id | | | | | | Order line's identifier | Product in Order > Item Order Line ID | | | 143 | | | order_line_index | | | | | | Order line's index in the order | N/A | | | 144 | | | order_line_state | | | | | | Order line's state STAGING, WAITING_ACCEPTANCE, WAITING_DEBIT, WAITING_DEBIT_PAYMENT, SHIPPING, SHIPPED, TO_COLLECT, RECEIVED, CLOSED, REFUSED, CANCELED, INCIDENT_OPEN, REFUNDED, | Product in Order > Status | | | 145 | | | order_line_state_reason_code | | | | | | Reason's code of the order line's state | N/A | | | 146 | | | order_line_state_reason_label | | | | | | Reason's label of the order line's state | N/A | | | 147 | | | price | | | | | | Order line's price without shipping price | Product in Order > Item Price | Product in Order > Item Price / Product In Order > Quantity | | 148 | | | price_additional_info | | | | | | Price's additional information of the offer | N/A | | | 149 | | | price_amount_breakdown | | | | | | | | | | 150 | | | price_unit | | | | | | Unit price for the offer associated with the order line | N/A | | | 151 | | | origin_unit_price | | | | | | | N/A | | | 152 | | | product_medias | | | | | | Media URL | N/A | | | 153 | | | product_sku | | | | | | Sku of the product associated with the order line | N/A | | | 154 | | | product_title | | | | | | Title of the product associated with the order line | Product in Order > Item Title | | | 155 | | | promotions | | | | | | List of promotions | N/A | | | 156 | | | quantity | | | | | | Product's quantity for the order line | Product in Order > Quantity | | | 157 | | | received_date | | | | | | Product's date of receipt | N/A | | | 158 | | | refunds | | | | | | List of the refunds | | Order Payment with type 'Refund” if there are details in the refund node we will need to create a new refund row. | | 159 | | | | amount | | | | | Refund's amount | Order Refund row > Amount | This applies for the row with type “Item“ | | 160 | | | | amount_breakdown | | | | | | N/A | | | 161 | | | | | parts | | | | | N/A | | | 162 | | | | | | amount | | | | N/A | | | 163 | | | | | | commissionable | | | | N/A | | | 164 | | | | | | debitable_from_customer | | | | N/A | | | 165 | | | | | | payable_to_shop | | | | N/A | | | 166 | | | | commission_amount | | | | | Refund's commission amount | N/A | | | 167 | | | | commission_tax_amount | | | | | Refund's commission taxes | N/A | | | 168 | | | | commission_taxes | | | | | | N/A | | | 169 | | | | | amount | | | | | N/A | | | 170 | | | | | code | | | | | N/A | | | 171 | | | | commission_total_amount | | | | | | N/A | | | 172 | | | | created_date | | | | | Refund's creation date | Order Refund row > Payment Date | | | 173 | | | | eco_contributions | | | | | Eco contributions | N/A | | | 174 | | | | id | | | | | Refund's id | Order Payment > Transaction ID | When we are sending refund we group the ids into a single payment row type refund but when we are downloading them every id will be a separate payment row type refund. We need to have the same logic also when we are downloading refund from MIRAKL and compare it to the transaction id. e.g: Transaction id = 2346-3563-1563 This means there are 3 refunds on the order and we store then in one payment row with 3 refund rows however the transaction id is constructed with all MIRAKL refund ids for the order “2346“, “3563“, “1563“ so when we are downloading the order we need to compare all refund ids. | | 175 | | | | purchase_information | | | | | | N/A | | | 176 | | | | | purchase_commission_on_price | | | | | N/A | | | 177 | | | | | purchase_commission_on_shipping | | | | | N/A | | | 178 | | | | | purchase_price | | | | | N/A | | | 179 | | | | | purchase_shipping_price | | | | | N/A | | | 180 | | | | quantity | | | | | The quantity of products canceled (This quantity is informative only) | N/A | Based on the details added in the refund row. | | 181 | | | | reason_code | | | | | Reason's code of the refund | Order Payment > Reason | Based on the ID we need to store the relevant reason {{TBC if this is the reasons}} "code": "15" = "Out of stock" "code": "16"= "Cancelled by the client prior to shipping" "code": "17" = "Item returned" "code": "18"= "Item not received" "code": "19" = "Agreement found with the vendor" | | 182 | | | | shipping_amount | | | | | Refund's shipping amount | Order Refund Row > Amount | This applies for the row with type “shipping“ | | 183 | | | | shipping_taxes | | | | | The taxes on the shipping price | | | | 184 | | | | | amount | | | | Tax amount | Order Refund Row > Refund VAT | This applies for the row with type “shipping“ | | 185 | | | | | | code | | | | N/A | | | 186 | | | | | | purchase_tax | | | | N/A | | | 187 | | | | | | | purchase_amount | | | N/A | | | 188 | | | | | | | purchase_rate | | | N/A | | | 189 | | | | | | rate | | | | N/A | | | 190 | | | | | state | | | | Refund's state WAITING_REFUND, WAITING_REFUND_PAYMENT, REFUNDED | N/A | | | 191 | | | | | taxes | | | | | | | | 192 | | | | | | amount | | | | Order Refund Row > Refund VAT | This applies for the row with type “item“ | | 193 | | | | | | code | | | | N/A | | | 194 | | | | | | purchase_tax | | | | N/A | | | 195 | | | | | | | purchase_amount | | | N/A | | | 196 | | | | | | | purchase_rate | | | N/A | | | 197 | | | | | | rate | | | | N/A | | | 198 | | | shipped_date | | | | | | | Orders > Shipping Shipped Date | | | 199 | | | shipping_from | | | | | | | N/A | | | 200 | | | | address | | | | | | N/A | | | 201 | | | | | city | | | | | N/A | | | 202 | | | | | country_iso_code | | | | | N/A | | | 203 | | | | | statestreet_1 | | | | | N/A | | | 204 | | | | | street_2 | | | | | N/A | | | 205 | | | | | zip_code | | | | | N/A | | | 206 | | | shipping_price | | | | | | Total price of the order line's shipping price | Product in Order > Item Shipping Cost | | | 207 | | | shipping_taxes | | | | | | | N/A | | | 208 | | | | amount | | | | | | (v1.1)Product in Order > Marketplace VAT Item Shipping Cost | <v1.1> We sum all order item VAT Amounts and store them in Orders > Total Shipping Marketplace VAT </v1.1> | | 209 | | | | code | | | | | | N/A | | | 210 | | | | purchase_tax | | | | | | N/A | | | 211 | | | | | purchase_amount | | | | | N/A | | | 212 | | | | rate | | | | | | N/A | | | 213 | | | taxes | | | | | | | | | | 214 | | | | amount | | | | | | Product in Order > Marketplace VAT Item Price | <v1.1> The item tax is the total VAT so we will have to divide it based on the order item quantity </v1.1> We want to multiply the vat based on the quantity for each order item then to sum all order item VAT Amounts and store them in Orders > Total Marketplace VAT | | 215 | | | | origin_unit_amount | | | | | | N/A | | | 216 | | | | code | | | | | | N/A | | | 217 | | | | purchase_tax | | | | | | | | | 218 | | | | | purchase_amount | | | | | N/A | | | 219 | | | | rate | | | | | | Product in Order > Marketplace VAT Percent | | | 220 | | | | tax_calculation_rule | | | | | | N/A | | | 221 | | | total_commission | | | | | | | N/A | | | 222 | | | total_price | | | | | | | N/A | | | 223 | | order_state | | | | | | | Order's state STAGING, WAITING_ACCEPTANCE, WAITING_DEBIT, WAITING_DEBIT_PAYMENT, SHIPPING, SHIPPED, TO_COLLECT, RECEIVED, CLOSED, REFUSED, CANCELED, INCIDENT_OPEN, REFUNDED, | Order > Order Status | Note: You can find more detailed explanations & mapped MP statuses to Hemi statuses under “mapping” table. | | 224 | | order_state_reason_code | | | | | | | Reason's code of the order state | N/A | | | 225 | | order_state_reason_label | | | | | | | Reason's label of the order state | N/A | | | 226 | | order_tax_mode | | | | | | | Please note: In case there is no tax, the prices will show the same amount in TAX_EXCLUDED and TAX_INCLUDED mode. The tax mode is only useful if taxes are specified in the order. Possible values: • TAX_EXCLUDED: the price fields (price, unit price, shipping price, cancellation amount, refund amount and order total prices) are expressed without tax (taxes should be added to these prices in order to get the full amount including taxes). • TAX_INCLUDED: the price fields include the tax amount. | N/A | | | 227 | | payment_type | | | | | | | The payment's type used by the customer to pay this order | Order > Order Payment Method | | | 228 | | payment_workflow | | | | | | | The payment workflow followed by the order PAY_ON_ACCEPTANCE, PAY_ON_DELIVERY, PAY_ON_DUE_DATE, PAY_ON_SHIPMENT, NO_CUSTOMER_PAYMENT_CONFIRMATION | N/A | | | 229 | | price | | | | | | | Order's price (sum of order line's price) | Order > Оrder Subtotal Аmount | This is the total amount without shipping cost | | 230 | | promotions | | | | | | | | | | | 231 | | | applied_promotions | | | | | | The promotions applied on this order | Order > Discount Type | | | 232 | | | total_deduced_amount | | | | | | The total amount deduced on this order thanks to the promotions | Order > Discount | | | 233 | | quote_id | | | | | | | Quote's id from which the order has been placed, or null if it was not from a quote | N/A | | | 234 | | references | | | | | | | | N/A | | | 235 | | | order_reference_for_customer | | | | | | | N/A | | | 236 | | | order_reference_for_seller | | | | | | | N/A | | | 237 | | shipping_carrier_code | | | | | | | Shipping carrier code (associated with the Shipping company label) | N/A | | | 238 | | shipping_company | | | | | | | Shipping company | Orders > Carrier AND Order Shipment > Courier | | | 239 | | shipping_deadline | | | | | | | Order's shipping deadline | N/A | | | 240 | | shipping_price | | | | | | | Order's shipping price (sum of order line's shipping price) | Orders > Shipping Service Cost | | | 241 | | shipping_pudo_id | | | | | | | PickUp DropOff (PUDO) point identifier | N/A | | | 242 | | shipping_tracking | | | | | | | Shipping tracking | Orders> Shipping Track Number AND Order Shipment > Track Number | | | 243 | | shipping_tracking_url | | | | | | | Shipping tracking url | Orders > Shipping Tracking URL AND Order Shipment > Tracking URL | | | 244 | | shipping_type_code | | | | | | | Code of shipping's type | N/A | | | 245 | | shipping_type_label | | | | | | | Label of shipping's type | Order > Shipping Service | | | 246 | | shipping_zone_code | | | | | | | Code of shipping's zone | N/A | | | 247 | | shipping_zone_label | | | | | | | Label of shipping's zone | N/A | | | 248 | | total_commission | | | | | | | Order's total commission (sum of the order line's total commission) | Order> Total Fee | | | 249 | | total_price | | | | | | | Total order's price (sum of the order's price and the order's shipping price). | Order > Оrder Тotal Аmount | | | 250 | | transaction_date | | | | | | | Order transaction date | Order Payment > Payment Date | | | 251 | | transaction_number | | | | | | | Order payment ID | Order Payment > Transaction ID | This is the payment row with type payment | | 252 | | fulfillment | | | | | | | | N/A | | | 253 | | | center | | | | | | | N/A | | | 254 | | | | code | | | | | | N/A | | | 255 | | customer_directly_pays_seller | | | | | | | | N/A | |

Get Orders cron should download orders according to their marketplace status:

MP Status Hemi Status
1 STAGING <v1.4>Pending</v1.4>
2 WAITING_ACCEPTANCE Pending
3 WAITING_DEBIT Pending
4 WAITING_DEBIT_PAYMENT Pending
5 SHIPPING Ready for Shipping
6 SHIPPED Shipped
7 TO_COLLECT Ready for Shipping
8 RECEIVED Shipped
9 CLOSED <v1.3>N/A (We do nothing just update MP Status).

There is only one edge case and this is when we have Orders > Status = Ready For Shipping and for some reason we received Orders > Marketplace Status = Closed. In this case Closed will be last MIRAKL status and we wont know if the order is actually shipped or cancelled thus we have to check the if all order items are refunded to treat it as Orders > Status = Cancelled else Orders > Status = Shipped

The other case is when we download an order directly on Closed status then we have to check again the cancelations and refunds on the order items

In order to check if there is a cancellation or refund we can use the following nodes: order_lines > cancelationsorder_lines >refunds There we can check for each order item what refunds or cancellations we have.</v1.3> | | 10 | REFUSED | Cancelled | | 11 | CANCELED | Cancelled | | 12 | INCIDENT_OPEN | Operators and customers can open an incident on an order whenever the order status allows an incident to be opened: • Shipping in Progress, • Shipped, • Received. So we will need to make sure we update the Order Item Marketplace Status because the incidents are per order line. If the order is not yet paid if the buyer opens an incident then the seller wont get paid. • If we download an order for the first time with INCIDENT_OPEN status we ??? | | 13 | REFUNDED | Cancelled |

Depend on which status we will receive the order we will need to follow different steps below is described the success flow however we might have cases where we are receiving order directly on Shipping status or even Shipped, thus we need to make sure depends on the status we are receiving the correct actions are performed. For example we are now incorporating the Order Acknowledge flag for MIRAKLs and if we download an order which is already accepted we need to update it as “Completed” otherwise by default each new order is downloaded with “Pending” statuses

If we have a new order which is already shipped we need to store all the relevant details like the order shipments, shipping info and the right statuses. If we have an order which is already stored in Hemi but is not shipped yet and we receive order updated we are updating the order with status shipped we still need to check if the order shipment is created, the shipping information is populated and the statuses are updated. If we have an order which is already stored in Hemi but is not shipped yet however we have added the order shipment and the shipping information and we receive order updated we are updating the order with status shipped without updating any other information in the shipping details

Success Flow:

  1. MP status = WAITING_ACCEPTANCE; Tool status = Pending and there wont be payment row yet;
  2. MP status = WAITING_DEBIT; Tool status = Pending and we create a payment row with status Pending;
  3. MP status = WAITING_DEBIT_PAYMENT; Tool status = Pending and we create a payment row with status Pending;
  4. MP status = SHIPPING; Tool status = Ready For Shipping and the payment row status is Completed;
  5. MP status = SHIPPED; Tool status = Shipped and the payment row status is Completed;
  6. MP status = RECEIVED; Tool status = Shipped and the payment row status is Completed;
Hemi Status Transition Comment
Pending From “Pending“ we can move to any other Hemi Status Pending status is indicating that something need to happen on the order like clear debit, waiting acceptance etc.
Incomplete From “Incomplete” we can move to
”Ready For Shipping”, “Shipped“, “Cancelled“ Incomplete status is used when we have something missing on the order, like address, items etc.
Ready For Shipping From ”Ready For Shipping” we can move to “Shipped“ or “Cancelled“ only Ready For Shipping indicates the order can be shipped successfully have all required information stored and payment cleared
Shipped From “Shipped“ we can move to “Cancelled“ Shipped indicating that the order has been dispatched.
Cancelled “Cancelled“ is our final status. Cancelled is the Hemi final status and we cannot revert back or move forward.

https://riverisland.wearepentagon.com/alpha/en/record-view/3100/41607

Is this article helpful?
0 0 0