I'm using external services to do a Callout and my input parameter is an array. I'm having trouble passing a collection variable as an input to the Action on a Flow.
I imported the following Service Schema JSON to an External Service
{
"swagger": "2.0",
"info": {
"description": "This is a simple API",
"version": "2.0.0",
"title": "Record Update API",
"contact": {
"email": "[email protected]"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"host": "virtserver.swaggerhub.com",
"basePath": "/eschwarzbock5/CreateAccountAndAcontacts/2.0.0",
"tags": [
{
"name": "admins",
"description": "Secured Admin-only calls"
},
{
"name": "developers",
"description": "Operations available to regular developers"
}
],
"schemes": [
"https"
],
"paths": {
"/account-and-contacts": {
"post": {
"tags": [
"AccountAndAcontacts"
],
"summary": "AccountAndAcontacts",
"description": "Creates Accounts and Contacts",
"operationId": "AccountAndAcontacts",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "body",
"name": "Accounts",
"required": false,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Account"
}
}
}
],
"responses": {
"201": {
"description": "item created"
},
"400": {
"description": "invalid input, object invalid"
},
"409": {
"description": "an existing item already exists"
}
}
}
}
},
"definitions": {
"Contact": {
"type": "object",
"properties": {
"firstName": {
"type": "string",
"example": "John"
},
"lastName": {
"type": "string",
"example": "Smith"
}
}
},
"Account": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "Account Name"
},
"contacts": {
"type": "array",
"items": {
"$ref": "#/definitions/Contact"
}
}
}
}
}
}
I created the Accounts parameter on the schema definition following the suggestion here: External Services Considerations where it says "Supported Inline Array Definition with Reference to Array Items Definition".
I created my accounts variable in my flow
The issue I'm having is when I want to pass the variable as an input to the Action, the collection I created doesn't appear as an option:
Does anyone know how set the input correctly? I assume this should be possible since Salesforce details how to create the arrays definitions.
Thanks!!