If you’ve ever dealt with Flow-based integration in the past, you might’ve heard terms like External Object and External Service in Salesforce thrown about a lot, or even conflated.

Both the External Object and External Services let us expedite operations to third-party services.

Here a quick review of some taxonomy:

External Objects:

They’re similar to Custom Objects, except they map to data that’s stored outside your Salesforce Org from within the CRM. Every external object depends on an external data source definition to link to external databases.

External Service:

This is a powerful administrative tool for no Code API usage. In the coming sections, we’ve used External Services to connect to a service of your choice and invoke methods based on the external source via Flows.

Oftentimes, the idea of API deployment conjures complex, code-heavy implementations.

But Salesforce’s External Services let even Accidental Admins use no-code API solutions to configure APIs with schemas.

What even is a schema?

Broadly, it’s a documented structure of services and methods that we can leverage. More notably:

  • A Schema definition is human-readable, structured data.
  • It’s comprised of inputs and output types you can include in the calls, or requests, that an Org makes to the external service.
  • It also holds endpoint information and authentication parameters for REST-based API web services.
  • Schema formats allow External Services to process the data so it can generate Apex actions.

(Apex actions are what we later use for I/O in Flows).

Configure External Service :

Schema considerations to use External Service-generated Apex Class through Flows

  1. There’s a 100,000 character maximum limit.
  2. Only supported methods justify inclusion.
  3. Parameters must be named.
  4. You can’t use nested or complex Objects as inputs or outputs in your service.
  5. Every property must be assigned a value.
  6. Header and form parameters aren’t supported.
  7. Security settings from the schema aren’t supported.
  8. Supported input and output type in your service(Boolean, integer, double, string, datetime)
  9. We can use GET, PATCH, PUT, POST, and DELETE methods to query a schema.

Note: Before we register and use External Services, we’ll need to provide a schema that describes the services and methods, and meets the above specifications.

Schema example: https://th-external-services.herokuapp.com/accounts/schema

Purpose: Use External Services to connect to a service of your choice, invoke methods based on the external source via a flow, and import(Swagger or Interagent-based API) data from the service into Salesforce Service.

A general sequence of steps for configuration...

  1. A 3rd party (External web service provider) shares it’s rest based schema specifications.
  2. Then, a schema definition is created to describe the API.
  3. Next, named credentials are created to authenticate to the services endpoints
  4. The External Service is registered using the named credentials and schema definition. The schema needs to be complete and JSON compliant.
  5. External Services import the definitions into Org and generates Apex Actions that are made available in a Lightning Flow.

Thereon, we can use Apex Actions from within Flows, and every time a Flow executes, an External Service sends the callout and return based on schema definition.

… and walk-through of these steps as followed by us.

  1. First, we’ll need to create a Named Credential to authorize the two systems.

As we know already, a schema consists of the endpoint information and authentication parameters for the REST-based API web services. Likewise, we’ll use these in our named credentials.

Caution :

Be sure that you have the Interagent hyper-schema or OpenAPI version 2.0 endpoint information for the service that you’re registering before setting up a named credential.

Go to

Named Credential 🡪 New

Then, enter values for Label, Name, and the “URL to your External web service provider service endpoint that needs to be accessed”.

2. Since External Service will be calling our external services from within a Flow you’ll also need to register the callout endpoint to a Remote Site Setting.

3. Now that we’ve set up all required authentications and registration we’ll move to add External Service from Salesforce

  • Switch to Lightning and click Add an External Service.

Enter a service name( description optional).

  1. Choose a named credential.
  2. Enter a schema URL path, or alternatively, provide a complete schema.
  • Any schema URL path you enter must begin with a forward slash or ‘/’ and be a relative path.

For example: /accountSchema.json.

And again, the schema you provide must be complete and JSON-compliant.

Click Next and then Done.

Result:

A list of available Apex actions with input and output gets displayed.

Also, we can find these generated Apex Actions in the Flow Toolbox.

Finally, it’s time to test our external services apex Actions using Flows

Let’s jump into the Flow Builder to see this in action:

  1. First, go to

Setup 🡪 Flows 🡪 New Flow

Select Screen Flow and click Create.

 2. Based on your requirements, we can create Flow Logic.

And usually, we’ll set up a Salesforce Org(create field) to display results once the callout routine finishes. We then add a Screen Component from the toolbox in Flow Builder to get input from the user as per our schema definition.

To do this, from the toolbox, select and drag Apex Action to the screen.

a. Change Filter Type to External Services to see external services in action.

Apex Actions are the methods pertaining to our service provider, that we can use in a Flow to fish out information.

So, select the method that was described and needs to be used from the External Service Wizard.

b. As depicted here in this trial, set parameters for method invocation by Flow variables if needed.

c. Once you’re finished configuring the Flow, it should look as follows:

d. If there are no alerts in the Debug, it means you’ve just made a successful callout to external service.

Summary

Even with all its flexibility and features of External Services, there are still quite a few key benefits to using Enhanced External Services over them. For example, Enhanced External Services can handle more complex OpenAPI 2.0 schema, nested object types, and send parameters as headers within HTTP requests.

For more information on configuring no-code tools, API services, and practical third party integrations, reach out to us at sales@hicglobalsolutions.com

Related Articles
Step-by-Step Guide to Creating a Custom Agentforce Agent

A custom Agentforce Agent is imperative to increase the efficiency and effectiveness of your business operations. Do you know why? In this blog, we will walk you through the key steps that can help you create a custom Agentforce Agent: What is Agentforce? Agentforce is an AI support service designed to assist agents in providing […]

Read More
Steps to Develop Prompt Template with Data Using Flow or Apex

In the world of Salesforce development, prompt templates are like the secret ingredient that powers some of the coolest features in Einstein 1 Studio. They’re the behind-the-scenes magicians who make things happen, from drafting personalized emails to summarizing records and beyond. But here’s the thing: to make these templates truly shine, you’ve got to ground […]

Read More
A Complete Guide to Second Generation Managed Packages

Second Generation Managed Packaging (2GP) is a must-have modern approach that helps in building and managing packages on Salesforce. It offers a myriad of tools for developing, distributing, and managing apps and metadata to AppExchange partners.   With the help of Managed 2GP packaging, you can utilize your custom Apex code, interact with your version control […]

Read More
Unlocking the Future Salesforce's Biometrics Service for Mobile Apps

Salesforce’s cutting-edge offering, Biometrics Service, is about to revolutionize mobile utility safety with its Spring ’24 release. This new carrier lets builders seamlessly integrate biometric authentication functions, including fingerprint and facial recognition, without delay into Lightning Net components (LWCs). This capability is important for defensive touchy records on mobile gadgets, ensuring unauthorized entry is thwarted […]

Read More
creating-dynamic-pagination-in-salesforce-using-lightning-web-components.jpg

Dynamic Pagination is a useful technique in Salesforce used for splitting large datasets into smaller and more manageable pages. The main purpose of “Dynamic Pagination” is to boost the user experience while dealing with a large amount of information. So, creating a Dynamic Pagination is important! In this blog, we will show you how to […]

Read More

Salesforce CPQ (Configure, Price, Quote) is a powerful tool that enables businesses to streamline their quoting process by providing advanced configuration options. Among its many features, Multi-Dimensional Quoting (MDQ) stands out as a powerful capability that allows sales teams to create more detailed and flexible quotes for complex products. In this blog, we’ll dive into […]

Read More
Our Location worldwide
Indian Flag India
3rd Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203117884
United States of America Flag USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
United Kingdom Flag UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
Canada Canada
HIC Global Solutions INC
43 Lafferty Lane, Richmond Hill, L4C 3N8, CA +1(262) 310-7818