Quick win: 13. Spinning External service OpenAPI (OAS) in Salesforce and in flow

Itsmem0h1t
3 min readAug 10, 2022

Guide — How to

Objective: We will see how to easily integrate Salesforce with the backend system using Salesforce feature called “external services” and no code approach (flow). The backend is a banking platform offering service in Open API specification format (OAS: previously known as Swagger Service)

How to Setup

Step 1

  1. Create a named credential for the external Service in order to authenticate and access API resources
  2. Create an External Service_ for this navigate to Home → Setup → Integrations → external Service → Click New
  3. Select Open API Spec and give name, select Named cred and provide the Service Schema JSON , for this
  4. open the url and copy the JSON content and paste it there https://th-external-services.herokuapp.com/accounts/schema, hit save and Next

5. You can view the methods this service has to offer by pasting the JSON content here https://editor.swagger.io/

Step 2:

  1. Create a screen flow that takes the Account Last name and Account type from the user and calls Add Account method on the Web Service and retrieve the bank details from external system

The whole idea of this flow is to create a guided process which asks the user inputs and retrieve the customer’s bank details, if the bank details doesn’t exists it creates/ adds a new bank account for it in external system and returns the Id back to SF otherwise if the bank details exists it returns the bank account details back to user

  • GET Account invokable action
GET Bank Details
  • AddAccount invokable action

This is how you can visualize the flow on contact / Account record

Thanks & Cheers Mohit

--

--