Skip to main content

Hi All - I'm looking to use External Services to integrate with ORICD, an organization that provides a "persistent identifier for individuals to use as they engage in research, scholarship, and innovation activities." The overall goal is to link a contact to their ORICD record.

 

I've been able to set up an ES using ORCID's OpenAPI 2.0 spec, but am getting this error when calling it via a flow: "Error Occurred: Unable to map response for parameter: 200 and invokable action: ORCID.viewEducations." The response shows valid ORCID data, but it appears Salesforce can't parse it.

 

Any idea what might be wrong? The API spec I used when creating the ES is attached. It can also be found online, here.

 

Thanks,  —Patrick #Salesforce Developer

8 respostas
  1. 15 de out. de 2021, 14:13

    Unfortunately it's pretty rare that you can just copy and paste a Swagger spec into ES and it works in Salesforce. There are a number of nuances and tweaks you have to make. I suspect the problem is with your Apex variable that you've declared in Flow. If the variable is incorrect, say it's a collection when it shouldn't be or vice versa, then yes you will see a success 200 but Salesforce can't read the data because of the variable issue.

     

    This schema online is much too long for me to say specifically and the attachment you posted doesn't seem to be right. I see multiple produces statements which could be an issue as well.

    If you use Postman then I'd try there and view the 200 response and then make sure that any arrays "[]" are defined as collection variables in your Flow and others are just single variables. For instance: education-summary is an array so needs to be a collection variable in Flow. If not will reject.  I'll be honest some schemas have taken me many hours to figure out why I see a 200 but can't read it in Salesforce.

     Also you cannot skip variables. So if the 200 response contains elements A-F, even if you just care about element B, you must declare ALL apex variables and make sure you are capturing the complete response or it will be rejected by Salesforce.

0/9000