I'm trying to create an ION API flow to expose FieldUpdate for an integration without allowing for changes to mode, upsert, etc. I have the following schema defined:
{
"type": "object",
"properties": {
"request": {
"type": "object",
"properties": {
"cono": {
"type": "integer"
},
"operinit": {
"type": "string"
},
"whse": {
"type": "string"
},
"priceregion": {
"type": "string"
}
}
}
}
}
Along with a JQ Transform to create the request payload for FieldUpdate:
{
"CompanyNumber": .request.cono,
"Operator": (.request.operinit | tostring),
"AuthID": "SxApi",
"AuthAppKey": "authkeyhere",
"debug": false,
"dlcheckskip": true,
"mode": "update",
"upsert": false,
"process": [
{
"table": "icsd",
"mode": "update",
"upsert": false,
"constraint": {
"cono": .request.cono,
"whse": (.request.whse | tostring)
},
"update": {
"priceregion": (.request.priceregion | tostring)
}
}
]
}
When I test from the JQ Transform, I receive the expected JSON representing the request payload for FieldUpdate. If I paste that into the API node to test it, the call executes as expected. Where I'm running into trouble though is testing this from the start node. Using the same test payload, I receive the following response:
{"result":{"0001_table":"icsd","0001_mode":"update","0001_whereclause":"icsd.whse = 'null'","0001_recsProcessed":0,"0001_fieldsChanged":"","errorMessage":"","timeRunSec":0,"timeRunMS":10}}
Cono is missing in the where clause and whse is read as null. What's causing the discrepancy in the results when running them one by one versus testing the entire flow?
Thank you!