Hi Im trying to send a POST request to an endpoint from a salesforce flow, but the response of the external endpoint comes in this format:
{ "1FDUF7GT7ABV74894": { "make":"Ford", "model":"F-550 Super Duty", "year":2019, "fuelType":"Biodiesel", "weightClass": "LD" }, "8FDTUFGADF78ASF545": { "make":"Hyundai", "model":"eon", "year":2012, "fuelType":"gasoline", "weightClass": "s" } "invalidVins":[] } As you can see, the response is not a list but kind of a map which properties names may be dynamic. Of course the key is the id of the element.
I am suspecting that salesforce flow cannot handle that kind of response, since it uses a temporal apex class to handle the structure of the http response.
Do we have to change the structure of the response into a list and replace the property named with the code with => "id":"1FDUf..."
Or is there a way to handle the response this way in a salesforce flow?
This is the error Im currently getting:
Invalid output parameter type ObjectDataType{ServiceComponent{name=, label=null, variant=null, version='[ANY] | active', description=null, createdDate=2025-02-21 21:10:45, createdById=005DL00000IcRaS, lastModifiedDate=2025-02-21 21:10:46, lastModifiedById=faiohfdaksdf, id=ahfñlkasdfjdñaks}, properties=[1FDUF7GT7ABV74894,invalidVins]} of parameter 2XX for invocable action ValidateVINsCallout.Validate VINs Callout