Marketplaces / The Range [DRAFT] / The Range - Order management - In progress / The Range - Order Download - In progress

The Range - Order Download - In progress

The purpose of this page is to give detailed explanations and good understanding of the order flow, how we download orders & enrich orders on The Range MP.

Basically, to download orders, first we need to make “Order Feed“ API call only. By using this call, all related information for the order is returned as order status, products in order, shipping address, etc. We should store returned information into respectively Hemi fields (please see mapping table).

The cron run will check for new orders in the last 90 days and afterwards we will get the date from last_date_run table and filter orders using parameter:

from - {last_date_run - 1 hours}

When we download the orders we need to check if the order already exist in Hemi, or it does not exist. If not exist, we need to store all related information in Hemi and also- to download the order in Hemi on respectively statuses.

If the order does not exist in Hemi and once we download it on MP status “Unfulfilled“ , we will store the order in Hemi and our internal status will be “Ready For Shipping“;

If the order does not exist in Hemi and once we download it on MP status “Part-Fulfilled“ , we will store the order in Hemi and our internal status will be “Partially Shipped“, respectively if the order status is “Fulfilled“, Hemi status will be ““Shipped“ and if the order MP status is “Cancelled“ , the order status in Hemi will be “Cancelled“

Also, when we download order , we should always create a payment record. As per confirmation from The Range, we should always threat an order as paid. ( “Payment is taken upfront on the website before it’s passed onto you. There are only a few exceptions to this, but none that should be relevant to our Marketplace sellers (unless they offer a bespoke service)“)

As into the response for Order Feed call, there is no information regarding payments,, We need to calculate the info from the order (to multiply the ordered quantity of a product with the product price) and then we need to store the respectively information into payment row.

Assuming Order created time will be equal to Order Paid Time. - To be tested once credentials are provided

Order statuses:

The Range Order Status The Range Notes Hemi Order Status Hemi Notes
1 U Unfulfilled Ready For Shipping
2 PF Part-Fulfilled Partially Shipped
3 F Fulfilled Shipped
4 C Cancelled Cancelled

API Call: https://supplier.rstore.com/rest/order_feed.api?supplier_id=1

API Docs: https://marketplacetherange.zendesk.com/hc/en-gb/articles/360018374437-API-Order-Feed

We need to provide mandatory our id, passed from the authenticate api.

Example Request:

{
"search": "W000001",
"type": "all",
"from": "2016-05-01 00:00:00",
"to": "2016-06-01 00:00:00",
"mode": "Test"
}

Note: The mode will be switched on “Live“ once we release the project!

The Range Field Integration Required The Range Notes
search Optional search term to filter the data received.
type Optional either "all" (default), "new", "pending", or "historic".
from Optional the earliest date from which orders may be returned.
to Optional the latest date from which orders may be returned. This may not result in a date range greater than 35 days. TBD
mode Optional either "Test", or "Live", the expected mode the supplier account is in.

Example Response:

{
"order_arr":[
{
"order_disp":"W0000009-1D-S",
"customer_name":"George Daniels",
"postcode":"AB1 2CD",
"building_name_number":"10",
"organisation":"The Range",
"street":"Thornbury Road",
"city":"Plymouth",
"county":"Devon",
"country":"United Kingdom",
"customer_telephone":"0123456789",
"customer_email_address":"test@123.com",
"sku":101899,
"title":"Sea Ya Crystal Rose 12",
"qty":2,
"status":"F",
"order_placed_date":"2016-05-19 17:24:49",
"despatch_date":"2016-05-19 00:00:00",
"courier_name":“XDP”,
"delivery_service":"Saver Delivery",
"tracking_reference":"XX893457345",
"notes":"this is order note"
},
{
"order_disp":"W0000008-1D-S",
"customer_name":"Julian Somebody",
"postcode":"AB6 7AA",
"building_name_number":"15",
"organisation":null,
"street":"Thornbury Road",
"city":"Plymouth",
"county":"Devon",
"country":"United Kingdom",
"customer_telephone":"9123456789",
"customer_email_address":"juliantest@123.com",
"sku":101899,
"title":"Sea Ya Crystal Rose 12",
"qty":4,
"status":"U",
"order_placed_date":"2016-05-19 17:18:50",
"despatch_date":null,
"courier_name":null,
"delivery_service":"Saver Delivery",
"tracking_reference":null,
"notes":"this is order note"
},
{
"order_disp":"W0000008-1D-S",
"customer_name":"Julian Somebody",
"postcode":" AB6 7AA ",
"building_name_number":"12",
"organisation":null,
"street":"Thornbury Road",
"city":"Plymouth",
"county":"Devon",
"country":"United Kingdom",
"customer_telephone":"9123456789",
"customer_email_address":"juliantest@123.com",
"sku":101899,
"title":"Sea Ya Crystal Rose 12",
"qty":2,
"status":"F",
"order_placed_date":"2016-05-19 17:18:50",
"despatch_date":"2016-05-19 00:00:00",
"courier_name":”XDP”,
"delivery_service":"Saver Delivery",
"tracking_reference":"XX893434",
"notes":"this is order note"
}
],
"records_total":3,
"records_filtered":3
}

Response Mapping:

Integration Field Integration Note Integration Required Hemi Field Hemi Note
order_arr
order_disp Orders > Marketplace Order ID
customer_name Orders > Shipping Buyer Name
postcode Orders > Shipping Postal Code
building_name_number N/A
organisation Orders > Company Name
street Orders > Shipping Street 1
city Orders > Shipping City
county Orders > Shipping State Province
country Orders > Shipping Country Name
customer_telephone Orders > Shipping Phone
customer_email_address Orders > Buyer mail
sku Product in Order > SKU
title Product in Order > Item Title
qty Product in Order > Quantity
status Orders > Order Status
order_placed_date Order > Order Created Time
despatch_date N/A
courier_name Order Shipment > Courier
delivery_service Orders > Shipping Service
tracking_reference Order > Shipping Track Number
notes Product in Order > Note
records_total N/A
records_filtered N/A

We need to make sure we will store the order payment details as follow:

order_placed_date=Order created time = Order Paid time

Оrder Тotal Аmount - The total amount of the order the buyer is paying:

Price SKU 1 Quantity SKU 1 + Price SKU2 Quantity SKU 2 + Shipping cost

Order Subtotal Amount - The total amount only for the items (no shipping) :

Price SKU 1 Quantity SKU 1 + Price SKU2 Quantity SKU 2

Shipping Service Cost - TBD with The Range; - Vary for region? or based on the ordered goods??

Is this article helpful?
0 0 0