Salesforce Integration Guide

This post will discuss Salesforce Integration and different ways to integrate Salesforce System with external systems. This Salesforce integration guide will help you to understand Salesforce integration Patterns and Integration Best Practices. Let’s understand What is Salesforce Integration? and start our Salesforce Integration Crash course. Let’s start our Salesforce Integration Tutorial to cover all the fundamentals of Salesforce Integration.

What is Salesforce Integration?

Salesforce Integration is a process of connecting two or more applications. Enterprise system uses many applications, many or most of which are not designed to work with one another out of the box. Each application can have data, business logic, presentation, and security layers, all of which are possible targets for integration.

Why Integration

Salesforce can’t be the source of everything. It can be CRM or any Custom application. However, SAP can own Order Management or Inventory, an External email system, a System for Payment, and External Fleet Management. The possibility that Salesforce would need to exchange data with these systems is high.

Basic Integration Architecture

Let’s understand the Integration Architecture first. While integrating, we have a different way to integrate the system using point-to-point, hub & spoke, and ESB. All of them have their benefit.

  • Point-to-Point Integration
  • Hub and Spoke Integration
  • Enterprise Service Bus (ESB)

Let’s understand it in detail.

1. Point-to-Point Integration

Each system is connected to every other system through direct integration. Easy to implement with only a few systems. Difficult to scale

Salesforce Point to Point Integration

2. Hub and Spoke Integration

  • Every system connects to the Hub.
  • All data transfer is done through the hub.
  • Easy to design and implement.
  • Architectures are proprietary in nature.
  • Single point of failure.
  • Inability to support large transaction volumes
Hub and Spoke Integration

3. Enterprise Service Bus (ESB)

  • Distributed services architecture.
  • Employs distributed adapters.
  • Highly scalable.
Enterprise Service Bus (ESB)

Salesforce Integration Direction

Integration can be in two directions: inbound integration or outbound Integration.

  • Inbound Integration: An external system initiates contact with Salesforce.
  • Outbound Integration: Salesforce initiates contact with an external system.
Salesforce Integration Direction

Salesforce Integration Levels

There are three different levels of Integration.

  1. User Interface: Display information from the external system in the Salesforce Application.
  2. Application Logic: Leverage interfaces like APIs to allow interaction with external data and business processes.
  3. Data: Extract, Transform, and Load data between data stores.
Salesforce Integration Levels

What is the DMZ network in Integration Levels?

A DMZ Network is a perimeter network that protects and adds an extra layer of security to an organization’s internal local-area network from untrusted traffic. A common DMZ is a sub-network that sits between the public internet and private networks.

Time-Based Integration Processes

Salesforce integration can be Synchronous, Asynchronous, and a Batch process. Let’s see when to use which time-based Salesforce Integration processes.

1. Synchronous Process

A user action creates a request, and the user is blocked from continuing until the response is returned. A very near real-time response is expected and needed.

  • Tools/Technique: REST or SOAP API

Scenario: When a Salesforce account is created, a lookup must happen in the existing legacy system to check whether the account already exists before the Save is completed.

2. Asynchronous Process

A user action creates a request, and the system does not wait for the response before letting the user move to the next task. Analogous to near real-time process

  • Tools/Technique: MQ, Kafka

Scenario: When the user changes an account record, replicating the change to external systems begins immediately. However, the replication process does not block the user from continuing the work.

3. Batch Process

Large data volumes are broken into chunks and processed in queues based on available resources. It can be implemented through Bulk API and SOAP/REST API. Often associated with a scheduled process.

  • Tools/Technique: Bulk API/ETL/File Transfer

Scenario: When we need to update account information once in a day to a back-end system.

The Inception of API

API stands for Application Programming Interface. It is a set of definitions and protocols for building and integrating application software. API enables integration with heterogeneous systems and data to bring new business models, products, and services to the forefront.

The Inception of API

The Evolution of API

The Evolution of Salesforce API

1. SOAP

Simple Object Access Protocol (SOAP) is a protocol for exchanging information encoded in Extensible Markup Language (XML) between a client and a procedure or service online.

2. REST

REST is an acronym for Representational State Transfer. The basic premise is that developers use the standard HTTP methods, GET, POST, PUT, and DELETE, to query and mutate resources represented by URIs on the Internet. REST APIs are designed to make server-side data readily available by representing it in simple formats such as JSON and XML.

3. GraphQL

GraphQL was developed in response to REST APIs, with the idea that you could execute precise syntax that retrieves only what is needed, lightening the payload and simplifying the process significantly. The API can accept specific requests and return a result that matches the user’s needs.

4. gRPC

In gRPC, RPC stands for Remote Procedure Call and refers to something that can execute a function housed elsewhere but in a different context. A user on one side will select a remote procedure to execute, serialize the necessary parameters, and append any additional information to the message. This will then be sent to the server, which interacts with the other application, decoding the message and executing the operation. The result then comes back to the initial user.

FREE Salesforce Training

Difference between SOAP vs REST

Web Services API / SOAP REST
Meaning/Uses Simple Object Access Protocol uses WSDL Representational State Transfer, native use of all HTTP methods
Design Standardized protocol with pre-defined rules to follow.Architectural style with loose guidelines and recommendations.
ApproachFunction-driven (data available as services, e.g.: “getUser”) Data-driven (data available as resources, e.g. “user”).
StatefulnessFunction-driven (data available as services, e.g., “getUser”) Stateless (no server-side sessions)
CachingAPI calls cannot be cached.API calls can be cached.
SecurityWS-Security with SSL support. Built-in ACID compliance.Supports HTTPS and SSL
PerformanceRequires more bandwidth and computing power. Requires fewer resources.
Message formatOnly XML.Plain text, HTML, XML, JSON, YAML, and others.
Transfer protocol(s)HTTP, SMTP, UDP, and others. Only HTTP
Recommended for Public APIs for web services, mobile services, and social networks. Public APIs for web services, mobile services, social networks.
Advantages High security, standardized, extensibility. Scalability, better performance, browser-friendliness, flexibility.
Disadvantages Poorer performance, more complexity, less flexibility.Less security, not suitable for distributed environments.
Error Handling SOAP response will contain error information.Custom since there is no built-in.

What Integration options are available in Salesforce?

There are lots of Integration options available in Salesforce. Here is the Salesforce Integration Cheatsheet.

S.NoAPI NameProtocolData FormatCommunication
1REST APIRESTJSON, XMLSynchronous
2Apex REST APIRESTJSON, XML, CustomSynchronous
3SOAP APISOAP (WSDL)XMLSynchronous
4Apex SOAP APISOAP (WSDL)XMLSynchronous
5Chatter REST APIRESTJSON, XMLSynchronous (photos are processed asynchronously)
6Analytics REST APIRESTJSON, XMLSynchronous
7User Interface APIRESTJSONSynchronous
8Tooling APIREST or SOAP (WSDL)JSON, XML, CustomSynchronous
9Bulk APIRESTCSVAsynchronous
10Metadata APISOAP (WSDL)XMLAsynchronous. Retrieve, deploy, and modify metadata
11Streaming APIBayeuxJSONAsynchronous. Push notifications from Salesforce to
subscribing applications/entities
(replaces polling).

Let’s see the options available in Salesforce and when to use which Salesforce API for Integration.

1. What is REST API?

The Salesforce REST API lets you integrate with applications using simple HTTP methods in JSON or XML formats, making this an ideal API for developing mobile applications or external clients. Salesforce also supports Apex REST, which lets you create Web services on Force.com using Apex.

  • Representational State Transfer is a style of software architecture for distributed hypermedia systems.
  • REST API has a lightweight request and response framework
  • Simple, easy-to-use, and powerful web service based on RESTful principles.
  • Expose functionality via REST resources and HTTP methods.
  • (CRUD) records, search or query your data, retrieve object metadata, and access information about limits in your org.
  • REST API supports both XML and JSON.
  • Mobile and Web apps.
  • Rest resource is referenced using URI, information abstraction, and HTTP access.

1.1. Learn the basics of REST API

Check out our FREE Salesforce Integration Crash course.

YouTube video

1.2. Key points to consider for the REST APIs

  1. Authentication And Authorization
  2. Compression
  3. Caching Behavior
  4. Cross-Origin Resource Sharing
  5. Composite Resources
  6. Multipart Message for Blog data
  7. Status Codes and Error Response.
Key points to consider for the REST APIs

2. Apex REST API

You can use Apex REST API when out-of-the-box REST API cannot fulfill your business requirements. You can create your Apex REST API and expose it to an external system.

Here is some key considerations for APEX REST API.

Apex REST API

Note: Use the Continuation class in Apex to make a long-running request to an external Web service or Chaining Asynchronous Callouts.

Check our Salesforce Integration Crash Course.

3. SOAP API

  • Application layer protocol is used to exchange structured information between systems.
  • It uses a Web Services Description Language (WSDL) file to rigorously define the parameters for accessing data through the API.
  • SOAP API supports XML only.
  • Because SOAP API uses the WSDL file as a formal contract between the API and consumer, it’s excellent for writing server-to-server integrations.
  • Access to Salesforce data and business logic
  • Handles medium data volumes
  • Updates multiple records with a single

3.1. What is the difference between SOAP and REST?

Here is the difference between SOAP and REST API.

SOAP APIREST API
Relies on SOAP protocolRelies on REST architecture using HTTP
Transports data in XMLTransports data in JSON or XML
Highly structured/ typedLess structured? Less bulky data
Handles large data loadsWorks well with JavaScript
Designed with large enterprise application in mindDesigned with mobile devices in mind

3.2. What is WSDL?

WSDL (Web Services Description Language) is an XML document that describes a web service. There are two types of WSDL in  Salesforce:

  • Enterprise WSDL
  • Partner WSDL

3.3. What is the difference between Enterprise WSDL and Partner WSDL?

Here is the difference between Enterprise WDSL and Partner WDSL.

Enterprise WDSLPartner WSDL
Strongly TypedLoosely Typed
Tied to a specific configuration of SalesforceDoes not change if a custom field or custom objects are added to an organization’s Salesforce configuration
Changes if custom fields or custom objects are added to your organizationDoes not change if a custom field or custom objects are added to an organization’s Salesforce configuration

4. Apex SOAP API

Same as Apex REST API. You can Expose APEX SOAP API to an external system. Apex SOAP API supports both authentication OAuth 2.0 and Session ID.

5. Connect REST API

Connect REST API provides programmatic access to B2B Commerce, CMS-managed content, Experience Cloud sites, files, notifications, topics, and more. Use Connect REST API to display Chatter feeds, users, and groups, especially in mobile applications.

6. Analytics REST API

You can programmatically access CRM Analytics features such as datasets, dashboards, and lenses using the CRM Analytics REST API.

7. User Interface API

Build Salesforce UI for native mobile apps and custom web apps using the same API that Salesforce uses to build for the web and Salesforce for Android, iOS, and mobile web. Build user interfaces that let users work with records, list views, actions, favorites, and more.

8. Tooling API

Tooling API exposes metadata used in developer tooling that you can access through REST or SOAP. You can use Tooling API to build custom development tools or apps for Platform applications.

9. Bulk API

Bulk API is a specialized RESTful API for loading and querying lots of data at once. By lots, we mean 50,000 records or more. Bulk API is asynchronous, meaning you can submit a request and return later for the results. This approach is the preferred one when dealing with large amounts of data. There are two versions of Bulk API (1.0 and 2.0). Both versions handle large amounts of data, but we use Bulk API 2.0 in this module because it’s a bit easier to use

10. Metadata API

The main purpose of Metadata API is to move metadata between Salesforce orgs during the development process. Use Metadata API to deploy, retrieve, create, update, or delete customization information, such as custom object definitions and page layouts.

11. Streaming API

It enables the transmission of real-time data from the Salesforce Platform. Data is transmitted using Push Technology. Push Technology transfers information that is initiated from a server to the client. You can use one of the subscription mechanisms, such as CometD and Subscription API in node js or in Mulesoft. Push Technology is also called the publish/subscribe Model.

Streaming API
  1. Push Topic: Stream Salesforce changes based on SOQL
  2. Generic Streaming Events: publish Arbitrary String value
  3. Change Data Capture: New Version of Push Topic. No to SOQL
  4. Platform Event: new Version of Generic Streaming.

11.1. Tools for Event-Driven Architecture with Salesforce

Event-Driven Architecture with Salesforce

11.1.1 Push Topic

Push Topic enables to stream Salesforce record changes to clients based on criteria you define in
a SOQL query in a PushTopic record

Learn more about PushTopic Events in Salesforce.

11.1.2 Generic Streaming Events

Generic Streaming events enable you to publish event messages with an arbitrary string value that the client receives.

11.1.3 Change Data Capture

Change Data Capture is a streaming product on the Lightning Platform that enables you to integrate your Salesforce data with external systems efficiently. Change data capture is also called CDC. With Change Data Capture, you can receive changes in Salesforce records in real-time and synchronize corresponding records in an external data store.

Check when and how to use change data Capture.

11.1.4 Platform Event

Platform Event is based on Event-Driven Architecture, enabling apps to communicate inside and outside of Salesforce. Platform events are based on the publish/subscribe model and work directly with a message bus that handles the queue of incoming events and processes listening for them. This is built in real-time integration patterns in the Salesforce Platform, which helps to reduce point-to-point integration.

Learn more about Platform Events in Salesforce.

Ways to Fetch data from SFDC

There are different way to fetch data from Salesforce.

  1. Change Data Capture
  2. Outbound Messaging
  3. Apex Custom Code
  4. Polling
  5. Data Export
  6. Salesforce Connector
  7. Heroku Connect
Ways to Fetch data from SFDC

Data Integration with Salesforce

There are different ways and options available for Data Integration with Salesforce.

  1. Salesforce to External Systems
  2. External Systems to Salesforce
  3. Salesforce to Salesforce
Data Integration with Salesforce

Salesforce Integration Patterns

There are different Integration patterns like request and reply/response, Fire and forget, Batch Data Synchronization, Remote Call In, and Data Virtualization.

Salesforce Integration Patterns

In Salesforce, we have the below Integration patterns.

  1. Remote Process Invocation—Request and Reply: Salesforce invokes a process on a remote system, waits for the completion of that process, and then tracks the state based on the response from the remote system.
  2. Remote Process Invocation—Fire and Forget: Salesforce invokes a process in a remote system but doesn’t wait to complete the process. Instead, the remote process receives and acknowledges the request and then hands off control to Salesforce.
  3. Batch Data Synchronization: Data stored in Lightning Platform is created or refreshed to reflect updates from an external system and when changes from Lightning Platform are sent to an external system. Updates in either direction are done in a batch manner.
  4. Remote Call-In: Data stored in Lightning Platform is created, retrieved, updated, or deleted by a remote system.
  5. UI Update Based on Data Changes: The Salesforce user interface must be automatically updated due to changes to Salesforce data.
  6. Data Virtualization: Salesforce accesses external data in real time. This removes the need to persist data in Salesforce and then reconcile the data between Salesforce and the external system.

Learn about Salesforce integration Patterns and Integration Best Practices.

Enterprise Salesforce integration

YouTube video

Why Middleware in Enterprise Context

Here are 6 Fundamental Principles for Middleware in Enterprise Context:

  1. Transnationality: While Salesforce is transactional within itself, it cannot participate in distributed transactions or transactions initiated outside of Salesforce.
  2. Event handling: Event handling In Salesforce integrations using middleware, the control of event handling is assumed by the middleware layer.
  3. Queuing and buffering: Queuing and buffering generally rely on asynchronous message passing instead of a request-response architecture.
  4. Extract, transform, and load: Extract data from the source systems. This typically involves data from several source systems and relational and non-relational structures.
  5. Translation and transformation: Transformation is mapping one data format to another to ensure interoperability between the integrated systems. Typically, this entails reformatting messages en route to match the requirements of the sender or recipient.
  6. Mediation routing: Many middleware-based solutions depend on a message queue system. While some implementations permit routing logic to be provided by the messaging layer, others depend on client applications to provide routing information or allow for a mix of both paradigms.

Learn more about Enterprise Integration.

Common Salesforce Integration Scenarios & Solution

Check out our blog post Common Salesforce Integration Scenarios and Solutions. Here are some Salesforce Integration scenarios.

  • Synchronizing Accounts from Salesforce to SAP
  • Credit Card payments via an API
  • Passport Check via a Background Service
  • Multiple Real-Time Fitness Devices
  • Querying Bulk Data from Salesforce
  • Image / Document upload into Salesforce

Related Post

Check our post below for the Salesforce Integration tutorial.

FAQ’s

What is Salesforce Integration?

Salesforce Integration is a process of connecting two or more applications.

What are the types of integration in Salesforce?

Types of Salesforce integration, including API, data, business logic integration, and UI integration.

How to integrate Salesforce with External System.

You can integrate Salesforce with external systems using REST API or SOAP API.

Common Salesforce Integration Scenarios

Here are some Salesforce Integration scenarios.
1. Synchronizing Accounts from Salesforce to SAP
2. Credit Card payments via an API
3. Passport Check via a Background Service
4. Multiple Real-Time Fitness Devices
5. Querying Bulk Data from Salesforce
6. Image / Document upload into Salesforce

What are types of integration in Salesforce?

1. Point-to-Point Integration
2. Hub and Spoke Integration
3. Enterprise Service Bus (ESB)

Summary

Before integrating anything with Salesforce, as per the Architect, it is necessary to determine which system components are essential for security and may impact the integration pattern. I hope this Salesforce integration guide helped you to understand the Salesforce Integration Options. Thank you so much, Mrutyunjay Palai, for such great content.

Amit Chaudhary
Amit Chaudhary

Amit Chaudhary is Salesforce Application & System Architect and working on Salesforce Platform since 2010. He is Salesforce MVP since 2017 and have 17 Salesforce Certificates.

He is a active blogger and founder of Apex Hours.

Articles: 460

5 Comments

  1. Incorporating Salesforce integration is the definitive step towards optimizing business operations and driving growth. Seamlessly connecting diverse systems empowers organizations to streamline processes, enhance customer experiences, and make data-driven decisions.

Leave a Reply

Your email address will not be published. Required fields are marked *