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.