3

I'm trying to make use of the External Services functionality (currently in Beta) to demonstrate the potential use of point-and-click tools to perform integration. After reading the documentation and testing the functionality in Salesforce I've got a couple of questions:

  1. Does External Services support defining array attributes?
  2. Does External Services support defining another object inside of an object attribute?

Does External Services support defining array attributes?

Reviewing the External Services schema documentation it says that supported input types include an array of objects. However, when I define my array of objects Salesforce isn't recognising it. My example Swagger file structure is below (in YAML which I convert to JSON). Is there something wrong with the Swagger file?

swagger: "2.0"
info:
  version: "1.0"
  title: "TestService"
host: "test.com"
basePath: "/rest"
schemes:
- "https"
consumes:
- "application/json"
produces:
- "application/json"
paths:
  /performFunction:
    post:
      parameters:
      - name: "testAction"
        in: "body"
        required: true
        schema:
          type: array
          items:
              type: object
              properties:
                testAttribute:
                  type: string
      responses:
        200:
          description: "Successful"
        401:
          description: "Access Denied"  

Does External Services support defining another object inside of an object attribute?

I've also tried nesting an object inside another object. Salesforce is recognising the object as a parameter, however the action itself isn't appearing in Flow Designer to use. Swagger file structure below:

swagger: "2.0"
info:
  version: "1.0"
  title: "TestService"
host: "test.com"
basePath: "/rest"
schemes:
- "https"
consumes:
- "application/json"
produces:
- "application/json"
paths:
  /performFunction:
    post:
      parameters:
      - name: "testAction"
        in: "body"
        required: true
        schema:
          type: object
          properties:
            testObject:
              type: object
              properties:
                testAttribute:
                  type: string
      responses:
        200:
          description: "Successful"
        401:
          description: "Access Denied"  

Any assistance or advice would be greatly appreciated. Thanks!

  • I have a similar question re arrays salesforce.stackexchange.com/questions/218866/… and I've also asked it on the Integration Group on the trailblazer community. – JodieM May 22 '18 at 4:20
  • @JodieM I'm having a bit more of a dig now that it is out of beta, but from when I asked on the trailblazer community I got comments back that object in object attributes aren't supported. Hoping to get more info back and report back a summary of the findings :) – Clint Jun 12 '18 at 1:14
  • Yes, that is correct. So my actual question is if you have an API that ONLY returns JSON is there any way you can modify the External Services Schema to return the ID as a text value. (eg on POST, it returns 200OK, and an ID in a JSON response). My thoughts are that no, there is no way for this to be done, and External Services is just not ready for prime time, even though it is GA. – JodieM Jun 12 '18 at 5:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.