02-03-2021 01:36 PM
Hi Team,
I am working with a pipeline to grab a Item Fulfillment record under one subsidiary and then transitioning that IF to a new IF in the other. It is a 1 for 1 transaction on our side, so the data that we pull will be the same as the data input under the new company. That being said I continue run into the error below. I will post my mapping as well. I have tried a few different things and still seem to cum up short on this one and would love some insight.
Here is the mapping currently.
02-04-2021 11:43 AM
Sorry, I’m not seeing inventoryDetail anywhere. What is that associated with?
02-04-2021 11:47 AM
Inventory Detail shows up on your IF when you have Serial/Lot Numbers turned on and have Advance Inventory Feature enabled. This is to define, Bin, Serial # and quantity when you ship. We are a manufacture with serialized inventory so therefore the ‘Inventory Detail’ box is on all our transactions.
02-04-2021 11:50 AM
Hmm, I see. I don’t know how easy it would be for me to test that. But from the error you got, it looks like that info wasn’t available for this line item, or at least not where you looked for it.
02-04-2021 12:01 PM
“Expression worked for 6 previous documents”, but was missing on the 7th. You might need to use object.get(field, defaultValue) to return an object with the right structure when there is no value present.
Also, it looks like the inventoryDetail, when present, contains an array (InventoryAssignmentList/inventoryAssignment). You might need to set up another Mapper with its Mapping Root set to that array to map the individual elements. You might also need another sl.ensureArray to handle a result that only contains one item, since it won’t be an array.
02-05-2021 06:56 AM
So I went back to the root mapper and added the inventory detail. See below. However it seems that I am still coming up with an error. Interestingly if I do not add the inventory detail it creates the record in NS but only places the IF as ‘packed’. I have to fill out the detail in order to mark it shipped.
jsonPath($, “$record.itemList.item[].inventoryDetail.inventoryAssignmentList.inventoryAssignment[].issueInventoryNumber.name”)
sl.ensureArray(jsonPath($, “[‘soapenv:Body’].getResponse.readResponse.record[‘tranSales:itemList’][‘tranSales:item’][*][‘tranSales:inventoryDetail’][‘platformCommon:inventoryAssignmentList’][‘platformCommon:inventoryAssignment’][‘platformCommon:issueInventoryNumber’]”))