โ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-05-2021 09:31 AM
You canโt use an expression like that for a Target Path. The Target Path should just be a JSON path of where to map the value in the target schema.
โ02-05-2021 09:32 AM
So the root is bring it all inโฆ
Just seems to not want to itemize it on the target path.
โ02-05-2021 09:35 AM
Since youโre dealing with a list/array, you need to use another Mapper with its Mapping Root set to the inventoryAssignment array.
โ02-08-2021 11:30 AM
I am still seeming to have issues getting the Inventory detail in. i have added the additional mapper at the inventory Assignment level, however when I go to run it gives an error that no items are added. You will see on the EU Items mapper we get all the inventory detail on the input data but the output turns it to โnullโ, seemingly giving me the error. Is the detail mapper in the wrong spot in the pipeline? Let me know as we are so close on this!!
Truncated last line: sl.ensureArray($.get([โtranSales:inventoryDetailโ]))
โ02-10-2021 05:35 PM
Sorry, I just saw your last reply.
I think I see the problem. The inventoryDetail is not supposed to be an array. It can be null, but if itโs not, it should be an object. The object contains an array at the subpath inventoryAssignmentList.inventoryAssignment. So I think you need to handle it being null by providing a default value that adheres to that structure, using an expression like this:
sl.ensureArray($.get(โtranSales:inventoryDetailโ, {'inventoryAssignmentList': {'inventoryAssignment': []}))
Iโm not certain thatโs right, but give it a shot.