Hi All,
I know Salesforce isn’t necessarily the topic of conversation here, but I have never used code before and am really struggling with the API feature here and trying to get it to “talk” to salesforce.
I have used mockaroo to create a mock api that I would like to call from Salesforce flows. When registering the api as an external service in salesforce, I get the following error:
Syntax error: The schema is not supported or we could not identify the schema type from your API spec. Use supported schemas such as OpenAPI version 2 and OpenAPI version 3, or check the schema type field in your API spec. Ensure that the schema is valid by using a tool like Swagger Editor.
I believe this is because I need to define the fields in the handler script on mockaroo - but I don’t know any programming languages yet.
The default handler script that it has given me automatically is this:
schema “Xcom Character Pool”
generate 10
The schema I have defined here on Mockaroo contains the following fields:
Field Name - ID, Type - Row number
Field Name - First_Name__c, Type - First Name
Field Name - Last_Name__c, Type - Last Name
Field Name - Gender__c, Type - Gender (Binary)
Field Name - Nationality__c, Type - Custom List, Values - Advent, Argentina, Australia, Belarus, Belgium, Brazil, Canada, China, Colombia, Denmark, Egypt, France, Germany, Greece, India, Ireland, Israel, Italy, Japan, Mexico, Netherlands, Nigeria, Norway, Philippines, Poland, Russia, Romania, Saudi Arabia, Scotland, South Africa, South Korea, Spain, Sweden, Turkey, Ukraine, United Kingdom, Unknown, USA, XCOM
Field Name - Biography__c, Type - Paragraphs, Min 1, Max 3
Field Name - Can_appear_as_Soldier__c, Type - Boolean, Default TRUE
Field Name - Can_appear_as_VIP__c, Type - Boolean
Field Name - Can_appear_as_Dark_VIP__c, Type - Boolean
Field Name - Nickname__c, Type - Words, Min 1, Max 1
Field Name - Preferred_Class__c, Type - Custom List, Values - Rookie
Is there anyone who can help me make the handler script here in mockaroo define the outputs etc.?