โ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โ]โ))