How to easily implement API calls without code using External Services

How to easily implement API calls without code using External Services

Integration often strikes fear into the hearts of many Salesforce consultants. It’s commonly viewed as a task that requires extensive development work and deep technical knowledge, which can seem overwhelming. Although Flow HTTP Callout Actions have started to simplify the process, integration still holds a reputation for being difficult.

However, there’s one feature that can help consultants and architects navigate the integration world more easily: External Services. This powerful tool allows you to implement API calls within Salesforce Flows, all without writing a single line of code. All you need is the API's specification (commonly known as Swagger).

Getting Started:

  • Authentication Setup: Start by providing the necessary authentication details and endpoint URL. You can do this by creating a Named Credential and an External Credential in Salesforce Setup. These ensure that the external service can authenticate and communicate with Salesforce securely.
  • Setting Up External Services: Once authentication is configured, navigate to External Services in Setup, click "New," and choose “From API Specification.”

Article content

  • Here, input the name, description, and the Service Schema for the API, along with the Named Credential you just created. The Service Schema is a key component. It can either be an absolute URL or a relative URL where only the path needs to be specified (since the Named Credential already includes the domain). You can input the complete JSON specification or upload the Swagger file for the API.
  • Select Operations: Salesforce will pull the API specification and display it on the screen. From here, you can choose which operations you’d like to use. These operations will then be transformed into Invocable Actions that can be utilized in Flows, Apex, and other parts of the platform.
  • Using Invocable Actions in Flows: Once your Invocable Actions are set up, integrating them into Flows is as simple as dragging an Action element onto the Flow canvas and selecting the desired API operation. This allows you to build complex logic, leveraging external services without touching any code.

Limitations and Considerations:

External Services are ideal for request and reply integration patterns, where requests are handled synchronously. However, they are not designed to handle large volumes of data. When used in a Screen Flow, for instance, the user may encounter delays or be stuck if the external service experiences performance issues or errors. As error handling is managed by the caller (Salesforce), it's crucial to implement robust error handling in your Flow to avoid poor user experiences.

Further Resources:

For more detailed guidance on integration patterns, refer to this resource. Additionally, for a step-by-step tutorial on setting up External Services, check out this video.

In conclusion, External Services make it entirely possible to implement API calls without writing code. Consider utilizing this feature in your next Salesforce project for a smoother, more efficient integration process.

Bruno Teixeira

Salesforce Consultant | 8x Salesforce Certified | CPQ | OM | Vlocity Developer | OmniStudio (Vlocity) | Einstein Bot

7mo

Excelente artigo Artur Mafud espero ler os próximos em breve.

To view or add a comment, sign in

More articles by Artur Mafud

Insights from the community

Explore topics