I setup an external service to execute a Post callout through a Flow Action. The problem is I can't set the input in the action to an Apex-Defined variable which has two variables nested in it.
I have the following Service Schema JSON to an External Service:
{
"openapi": "3.0.1",
"info": {
"title": "cuustomTitle",
"description": "",
"version": "1.0"
},
"paths": {
"/api/path": {
"post": {
"description": "",
"operationId": "myOperationId",
"parameters": [{
"name": "county_of_residence",
"in": "query",
"required": false,
"allowEmptyValue": false,
"schema": {
"type": "object",
"properties": {
"county_state": {
"type": "string"
},
"county_name": {
"type": "string"
}
}
}
}],
"responses": {
"2XX": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"county_of_residence": {
"type": "object",
"properties": {
"county_state": {
"type": "string"
},
"county_name": {
"type": "string"
}
}
},
}
}
}
}
}
}
}
}
}
}
}
}
I am using in : 'query' instead of 'Body' in the parameters because I have dozens of parameters being assigned in the Flow and set in the Action, and I find it cleaner to maintain this way.
Assigned as such, where County is picked from a text-valued picklist, and State is also text data type:
In my Action Parameters, I get the following error:
The system receiving the API call has the schema built this way, so County and State must be embedded in county_of_residence for a successful call. Has anyone done anything similar before? Thanks!