Unfortunately, custom settings are read-only. Does anyone know if there is a way to set up a global variable scoped to the flow or its execution that I can access through hooks? That might give me what I need. I tried to access with a postResponseMap hook post lookup my line item data as part of an array within the record object but that's not how the postResponseMapData appear to be formatted. This is what I got instead:
{
"postResponseMapData": [
{
"_PARENT": {},
"ProductCode": "6516388DD-NOV-18DD",
"LocationType": "Available Stock",
"Quantity": 9,
"NSQtyOnHand": "8"
}
],
"_exportId": "630f877d78aab87cba1b1323",
"_connectionId": "62abe22e2fd46c408f127591",
"_flowId": "630f85803f8b5a4960280bdc",
"_integrationId": "6307b3cb27887910c1d0f026",
"settings": {
"integration": {
"style": "6516602",
"testMode": false
},
"flowGrouping": {},
"flow": {},
"export": {},
"connection": {}
}
}
I was hoping to get it in this format.
{
"data": [
{
"StockQuantityLineItem": [
{
"ProductCode": "6516602-BLK-08",
"LocationType": "Available Stock",
"Quantity": 106
},
{
"ProductCode": "6516602-BLK-10",
"LocationType": "Available Stock",
"Quantity": 150
},
{
"ProductCode": "6516602-BLK-12",
"LocationType": "Available Stock",
"Quantity": 237
},
{
"ProductCode": "6516602-BLK-14",
"LocationType": "Available Stock",
"Quantity": 319
},
{
"ProductCode": "6516602-BLK-16",
"LocationType": "Available Stock",
"Quantity": 208
},
{
"ProductCode": "6516602-BLK-18",
"LocationType": "Available Stock",
"Quantity": 74
},
{
"ProductCode": "6516602-MDN-08",
"LocationType": "Available Stock",
"Quantity": 10
},
{
"ProductCode": "6516602-MDN-10",
"LocationType": "Available Stock",
"Quantity": 23
},
{
"ProductCode": "6516602-MDN-12",
"LocationType": "Available Stock",
"Quantity": 32
},
{
"ProductCode": "6516602-MDN-14",
"LocationType": "Available Stock",
"Quantity": 34
},
{
"ProductCode": "6516602-MDN-16",
"LocationType": "Available Stock",
"Quantity": 34
},
{
"ProductCode": "6516602-MDN-18",
"LocationType": "Available Stock",
"Quantity": 12
}
]
}
],
"errors": [],
"abort": false,
"newErrorsAndRetryData": []
}
If I could get it in this format, I could weed out the line items with 0 difference in 3PL quantity and NetSuite quantity and use the input filter suggested above. Unfortunately, I can only get my data in this format in the preSave hook for the export and the preMap hook for the import.
Any words of wisdom?