Custom Order Import
The custom order import in HotWax Commerce is designed to integrate Shopify orders into the system based on each clientβs specific requirements. This flow involves transforming the order JSON using Apache NiFi and making client-specific adjustments for seamless import into HotWax Commerce.
Step 1: Import Orders Job
Job Name: Import Orders
Enum Id:
JOB_IMP_ORD
Enum Name: Import Orders
Config Id:
DNLD_ORDR
When the job runs, it downloads new order JSON files from Shopify.
SFTP Path:
./home/newera-uat-sftp/sync_contents/datamanager/imported/DNLD_ORDR
Step 2: NiFi Transformation
NiFi picks up the downloaded JSON files from the SFTP path and processes the following attributes from the payload:
Attributes in the JSON Payload
1. COD Fee
The field "代εΌγζζ°ζ" represents the COD Fee.
The COD Fee is split into:
COD Fee VAT (10%) β Mapped to
COD_FEE_TAX
COD Fee (90%) β Mapped to
COD_FEE
Example Calculation (COD Fee = 770):
COD Fee Tax (10%): 70
COD Fee (90%): 700
Order Adjustment Mapping:
100094
COD_FEE_TAX
NEC45433
70
100095
COD_FEE
NEC45433
700
2. Requested Delivery Date
The field "ι ιζ₯" is mapped to the
requestedDeliveryDate
of theorder_item
entity.
3. Requested Delivery Time
The field "ι ιζιεΈ―" is mapped to the
requestedDeliveryTime
of theorder_item
entity.
Step 3: Place Transformed JSON Back to SFTP
NiFi places the transformed JSON file on the SFTP path:
/home/newera-uat-sftp/hotwax/oms/CustomOrderImport
Step 4: Custom Order Import Job
Job Name: Custom Order Import
Enum Id:
JOB_CSTM_IMP_ORD
Enum Name: Custom Order Import
Config Id:
CSTM_ORDR_IMP
Property Resource:
FTP_CONFIG
This job calls the importJsonListData
service, which retrieves the transformed JSON from the SFTP path and imports it into HotWax Commerce.
Services Called
createShopifyOrder
Parameters:
UserLogin
Locale
timeZone
payload
shopifyConfigId
createUpdateOrderAdjustment
Parameters:
orderAdjustmentTypeId
amount
orderItemSeqId
shipGroupSeqId
updateAllOrderItems
Parameters:
requestedDeliveryDate
requestedDeliveryTime
Summary
The Custom Order Import Flow in HotWax Commerce:
Handles COD Fee calculations, splitting them into tax and actual fee components.
Maps requested delivery dates and times to the appropriate fields in the
order_item
entity.Uses Apache NiFi for transformation and a custom order import job for processing.
Ensures accurate and client-specific order details are imported into the system.
Last updated