Hi Team,
Need your advice to achieve the below requirement.
Customer has endpoint as "https://mingle-ionapi.inforcloudsuite.com/XXXX/CustomerApi/XXX/response/601" and send the JSON format payload (multiple packages) to update the package information in the end system. Here the end system supports BOD to update the required information.
To achieve this, we have performed below steps,
1. Created Data Flow with IMS connection point, Scripting, Splitter and Application connection point. The message from IMS is converted to BOD and then split to one package per message using splitter and given to Application endpoint(cor_inbox) for processing.
2. Created APIFlow with one activity to call the IMS endpoint created in step 1.
3. Created API Suite with the above APIFlow as target endpoint and written the Transformation policy to convert the JSON payload to IMS format payload.
With the above steps, we are able to perform proper update against the packages, but the challenge is passing the location ID in the BOD. Here the locationID is mentioned in the URL as path parameter (601) that decides the location in the BOD and the end system has multiple location ID's.
Could you please let me know the way to access the path parameter value in the transformation policy? So that i can pass it in the payload given to IMS and use it in the script while the BOD generation.
Sample Message :
{
"primaryorderid": "OD1",
"carrier_id": "C1",
"ship_via": "CARGO",
"shiping_cost": "0",
"ShipmentUnit": [
{
"order_id": "OD1",
"package_id": "P01",
"Tracking_no": "T01",
"Tracking_no_URL": "Carrier URL for tracking package"
},
{
"order_id": "OD1",
"package_id": "P02",
"Tracking_no": "T02",
"Tracking_no_URL": "Carrier URL for tracking package"
}
]
}
Payload after to IMS after applying the transformation policy:
{
"documentName": "XXX",
"fromLogicalId": "lid://infor.ims.XXX",
"messageId": "msg#1234555",
"toLogicalId": "lid://default",
"document": {
"encoding":"NONE",
"characterSet":"UTF-8",
"value":"{"primaryorderid":"OD1","carrier_id":"C1","ship_via":"CARGO","shiping_cost":"0","ShipmentUnit":[{"order_id":"OD1","package_id":"P01","Tracking_no":"T01","Tracking_no_URL":"Carrier URL for tracking package"},{"order_id":"OD1","package_id":"P02","Tracking_no":"T01","Tracking_no_URL":"Carrier URL for tracking package"}]}"
}
}
Regards,
Abhi.