Loading
Extend Salesforce with Clicks, Not Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          External Services

          External Services

          Connect your Salesforce org to an external API by using zero lines of code. Use declarative tools and OpenAPI specifications to describe the external API functionality, and External Services automatically creates invocable actions within Salesforce. Use External Services for outbound integrations from Salesforce by using low-code, process-based integrations or to turbocharge your Apex integrations. Call the invocable actions natively from Apex, or create a custom agent action, flow, or Einstein bot that interacts with the external API source.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Performance, Unlimited, and Developer Editions

          With External Services, you first register OpenAPI 2.0 or OpenAPI 3.0 schemas. The operations imported from your registered schema automatically become invocable in Apex, or as External Services action types within point-and-click automation tools such as Flow Builder, Orchestrator, Einstein bots, or OmniStudio Assets.

          External Services is best used when the externally hosted service is a RESTful service and the API specification is available in OpenAPI 2.0 or OpenAPI 3.0 JSON or YAML schema format.

          Introduction Video

          Watch the Introduction video to see how you can declaratively transform API specifications into invocable actions.

          • Example Use Cases
            The examples in this section demonstrate typical External Services workflows.
          • External Services Considerations
            Here are the semantic, service, and usage constraints to keep in mind when integrating your services into External Services.
          • Register an External Service
            Provide an API spec that describes your endpoint's services and methods. The API spec’s schema generates the external service operations with corresponding input and output parameters. You can also edit an exisiting registration, register an external service with a Mulesoft API, or register an external service using Flow Bulder's HTTP Callout functionality.
          • Use Agentforce to Invoke External Service Actions
            Add capabilities to agents with customizable actions configured via External Services. Use External Services to declaratively connect your Salesforce org to an external API. After you register an OpenAPI schema, the actions defined in that schema become automatically available as custom agent actions.
          • Use Flow to Invoke External Service Actions
            In this Flow example, design and test the automation that sends a user’s information from Salesforce to the external employee banking system. Create the variables for user phone numbers, and combine different phone numbers into one piece of data. Then use the external service action to create the user.
          • Invoke External Service Callouts Using Apex
            You can call external service registrations natively from Apex. Make a callout to an external service like the Apex Http Class without the need to write boilerplate code. The registered services are strongly typed in Apex with the registration’s schema as Apex types. These Apex types reflect your registered service’s specification, making the Apex compiler do the heavy lifting for you.
          • Add External Service Actions to an Einstein Bot
            Integrating your Einstein bot with a registered external service is now as easy as adding an action to a dialog. You can add an external service action to your bot from Einstein’s Bot Builder.
          • Invoke External Services from Omnistudio Assets
            You can invoke External Services' registered actions from Omnistudio Integration Procedures in OmniScripts and FlexCards.
          • Install or Create Packages
            You can install or create packages that contain an external service. Read these tips before you begin.
          • Testing External Services
            Test the example flow MyAtmFlow with a flow action calling the external service MyAtmExternalService by implementing the HttpCalloutMock interface. The interface provides a test response without performing the callout to the external service endpoint. The sample Apex unit test performs a mock test against the same HTTP callout mock implementation.
          • Schema Examples
            Explore various scenarios with OpenAPI 2.0 and OpenAPI 3.0 compliant JSON or YAML schemas supported by External Services. The examples cover schema elements like HTTP header as input parameters, and include example usage in Apex. Understanding the examples helps with proper syntax and code placement.
           
          Loading
          Salesforce Help | Article