Reader small image

You're reading from  Salesforce Lightning Platform Enterprise Architecture - Third Edition

Product typeBook
Published inNov 2019
Reading LevelIntermediate
PublisherPackt
ISBN-139781789956719
Edition3rd Edition
Languages
Concepts
Right arrow
Author (1)
Andrew Fawcett
Andrew Fawcett
author image
Andrew Fawcett

Andrew Fawcett has over 30 years of experience holding several software development-related roles with a focus around enterprise-level product architecture. He is experienced in managing all aspects of the software development life cycle across various technology platforms, frameworks, industry design patterns, and methodologies. He is currently a VP, Product Management, and a Salesforce Certified Platform Developer II at Salesforce. He is responsible for several key platform features and emergent products for Salesforce. He is an avid blogger, open source contributor and project owner, and an experienced speaker. He loves watching movies, Formula 1 motor racing, and building Lego!
Read more about Andrew Fawcett

Right arrow

Integrating with External Services

In today's world, the internet provides your customers with a wide variety of services to help them run their business efficiently. Once your application is released, your customers will want to integrate many of these services into your application's services as well. While there are significant application management optimizations and data security benefits to customers choosing multiple applications based on the same platform, the reality is that other services and platforms exist and may already be a part of your customer's infrastructure, which is why we need to use External Services.

Fortunately, Salesforce understands this and embraces the integration of external services in a variety of ways, regardless of whether it is an external process calling one of your application services and/or existing...

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...

Managing inbound integrations

While setting up user access to applications and objects stored in Salesforce, an administrator will grant access to applicable applications, tabs, and related objects via a Profile or Permission Set. By default, a user will log into the org through the standard Salesforce login page by entering their username and password. Salesforce provides standard user experiences for your users to access your objects, and, in doing so, fully tests that they honor security configurations. As such, they can be considered trusted experiences.

In fact, all standard Salesforce REST and SOAP APIs that are also used by the Lightning UIs honor the security configuration for a given user. This follows a best practice when building any type of API, which is to never trust the caller of the API. 

Now, consider if you or another developer wanted to integrate...

Understanding options for outbound integrations

In the following sections, I am categorizing outbound integrations accordingly:

  • Data integrations: When there is a need to access external databases or data stored in a relational form, this is called data integration. A new type of object known as an External Object is used to reflect external data in the Lightning Platform.
  • Service integrations: When there is a need to access External Services that perform some form of compute or complex task, this is called service integration. Providing such services are expressed using an Open API (also known as Swagger) specification. The External Services feature can be used to import such services for usage by Lightning Process Builder, Flow, and Apex.

With the exception of External Objects, outbound connections leverage the Named Credentials feature to manage authentication on behalf...

Summary

In this chapter, you saw how integrations are the lifeblood of the internet and are key to a business making the most out of the efficiencies offered by combining services from multiple vendors into a single process or experience for its employees and customers.

You learned that managing integrations can become complex and costly; however, this is something Salesforce has made easier by providing features that not only reduce the coding involved through External Services, but also improves security by taking this responsibility away from the developer and consolidating it as a set of features such as Connected Apps (inbound) and Auth Providers (outbound).

You also learned that administrators can audit and monitor external solutions, accessing precious data as well as controlling the flow of data potentially leaving the org through such features. Keep in mind that...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Salesforce Lightning Platform Enterprise Architecture - Third Edition
Published in: Nov 2019Publisher: PacktISBN-13: 9781789956719
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Andrew Fawcett

Andrew Fawcett has over 30 years of experience holding several software development-related roles with a focus around enterprise-level product architecture. He is experienced in managing all aspects of the software development life cycle across various technology platforms, frameworks, industry design patterns, and methodologies. He is currently a VP, Product Management, and a Salesforce Certified Platform Developer II at Salesforce. He is responsible for several key platform features and emergent products for Salesforce. He is an avid blogger, open source contributor and project owner, and an experienced speaker. He loves watching movies, Formula 1 motor racing, and building Lego!
Read more about Andrew Fawcett