Understanding inbound and outbound integrations

How you approach configuring integrations depends on the direction of the integration. This chapter uses the terms inbound and outbound to distinguish between those directions. The following outlines the definitions used in this book for both of these terms: 

  • An inbound connection is an external system calling Salesforce APIs or those APIs you have created via Apex. While managing these types of connections, you can use features and APIs such as Connect Apps, OAuth, Certificates, and Permission Sets.
  • An outbound connection is when Salesforce calls out to external system APIs. While managing these types of connections, you can use features such as Remote Sites and Named Credentials.
It is worth pointing out that making HTTP callouts is very commonplace in most languages today, and therefore it can initially seem quite simple to implement integrations. However, as complexity grows, dangers arise, especially when it comes to storing the credentials (username/password) or private certificates for such connections securely, as well as providing administrators with visibility and control over them. Implementing these integrations often require more investment on behalf of the developer to code, configure, and own.

The Lightning Platform features covered in this chapter are aimed at minimizing or, in some cases, totally removing the need for that investment, allowing the developer to focus entirely on the business requirement behind the integration need. 

The Salesforce REST APIs and your own Apex REST-based APIs (covered in Chapter 10, Providing Integration and Extensibility) are essentially providing inbound endpoints (URLs that point to the APIs) that expose access to your application's data and features. You can call these APIs from program code running on devices or other clouds in a variety of different ways. 

This is due to the underlying HTTP, JSON, XML, and OAuth protocols being so widely supported throughout the industry. The OAuth standard provides a secure means to authenticate and access APIs. In this chapter, we will cover the use of Connected Apps and other related features to enable such connections to be made securely and in such a way that an administrator can monitor and manage them directly without the aid of a developer.

For making outbound connections, we will explore the External Services and Salesforce Connect features offered by Lightning Platform. These offer more tailored options for making outbound integrations depending on the nature of the integration.

Salesforce also provides a feature known as Outbound Messaging, which is an action supported by the Workflow engine. This is the oldest integration feature that is still available on the platform today. You can configure it in the Setup menu and then create Workflow rules associated with objects and user actions, such as updating a record based on certain Workflow criteria.

Salesforce then generates a Web Service Definition Language (WSDL) specification for your external platform developer to implement. Notice that WSDL is an XML/SOAP-based definition, so there is no support for JSON. When the Workflow conditions are met, that endpoint is called by the platform, where there is no coding on the platform required.

External Services, when combined with Process Builder, offers a more flexible and less prescriptive means to accomplish this goal today. With that said, Outbound Messaging does work in the background and has some retry capabilities, while External Services on its own does not. Though, arguably, Platform Events in conjunction with External Services should also be considered if this is an important requirement.

Outbound Messaging is covered in more detail by Salesforce in its official documentation here: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_om_outboundmessaging.htm.

The next sections will give you a detailed discussion of these features along with some examples.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.217.220