Salesforce Integration with External System

In this blog post we talk about what is Integration? and how to integrate with external apps using Apex REST and SOAP services. We will also cover some Salesforce integration interview questions and Apex Integration Services.

If you want to learn about Getting data out of Salesforce in near-realtime then check this post. In thats session we covered the on the platform option like Outbound message, Apex Callouts, Salesforce connect and Off platform option like heroku Connect, Steaming Api, Change Data Capture, Polling.

What is Integration?

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.

We did one session in Apex hours. In that session we covered the Basic of Integration in Salesforce. Here is agenda which covered in that session

  • Web Communication Fundamentals
  • Understanding REST Vs SOAP
  • Message Exchange Formats – XML & JSON
  • Performing Callouts to External Services
    • HTTP Request & HTTP Response
  • Q & A

What Are the Integration Capabilities of Existing Systems?

  • Can the system make SOAP- or REST-based callouts?
    • Apex Custom Web services (SOAP, REST)
    • Salesforce APIs (e.g., SOAP, REST)
  • Does the system provide Web services? If so, what functionality is exposed?
    • Apex Callouts (SOAP, REST)
  • What type of authentication mechanisms are used in your environment? Does the system support SAML? OAuth?
    • Salesforce Identity (SAML, OpenId Connect, OAuth, Identity Management)
  • Can the system be customized?
    • Salesforce Platform Canvas
    • Outbound messaging

What is webservices?

Web service is a standardized medium to propagate communication between the client and server applications on the World Wide Web. Web services provide a common platform that allows multiple applications built on various programming languages to have the ability to communicate with each other.

Webservices is a functionality or code which helps to us to do integration. Web services are open standard (XML, SOAP, HTTP, etc.) based web applications that interact with other web applications for the purpose of exchanging data.

Type of Web Service

There are mainly two types of web services.

  • SOAP web services.
  • RESTful web services.

What is difference between SOAP and REST?

Here is difference between SOAP and REST 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

Difference between JSON Vs XML ?

Here is some difference betweek JSON and XML. Check this post for more detail.

JavaScript Object Notation has a type like String, number, Object, BooleanExtensible markup language is type less, and should be string
It is a way of representing objectsIt is a markup language and uses tag structure to represent data items
Retrieving value is easyRetrieving value is difficult
It does not provide any support for namespaces.It supports namespaces.
It is less securedIt is more secure than JSON
Guidelines: Key – Enclosed in double Quotes(String) Value – Can be any datatype {} – Object [] – Array , – Separates data element within ObjectGuidelines: Element – <lastname>hours</lastname> Element Definition: <xs:element name=”lastname” type=”xs:string”/> Attribute – <lastname lang=”EN”>Smith</lastname> Attribute Definition – <xs:attribute name=”lang” type=”xs:string”/>

Check this recording to learn about Basic of Integration in Salesforce

What all Integration option are available in Salesforce?

There are lots of Integration option are available in Salesforce. Some of the are below.

API NameProtocolData FormatCommunication
Chatter REST APIRESTJSON, XMLSynchronous (photos are processed asynchronously)
Analytics REST APIRESTJSON, XMLSynchronous
Bulk APIRESTCSV, JSON, XMLIts Asynchronous. Handle large data loads
with batching.
Metadata APISOAP (WSDL)XMLAsynchronous. Retrieve, deploy, and modify metadata.
Streaming APIBayeuxJSONAsynchronous. Push notifications from Salesforce to
subscribing applications/entities
(replaces polling).
Apex REST APIRESTJSON, XML, CustomSynchronous
Tooling APIBuild custom development tools
for Salesforce platform applications

What is REST API ?

  • 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, abstraction of information, access using HTTP methods

Basic of REST API, HTTP Method, Calling YouTube REST API from Salesforce

How to Integrate External Service with Salesforce?

  • Standard REST API (Check this post to learn more)
  • Custom REST API (Check this to learn more)

Integration in Salesforce using REST API | Standard REST API | APEX REST API | POSTMAN

If you want to learn about how to call Apex Class from Postman check below recording. Here is step by step process Test Salesforce Api by postman Rest Client.

We did one more session in Apex hours and covered all below topics.

  • External Service Callins to Salesforce
  • Salesforce Vs Apex REST
  • SOAP Callins using WebMethods
  • Enterprise & Partner WSDL
  • Q & A

What is SOAP API ?

  • Application layer protocol 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 great for writing server-to-server integrations.
  • Access to Salesforce data and business logic
  • Handles medium data volumes
  • Updates multiple records with single

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

What is SoapUI ?

soapUI is a free open-source desktop application targeted for developers and testers.
−RESTful Web Services (used by the Bulk API)
−SOAP-based Web Services

With soapUI you can Inspect, invoke, and develop Web Services and Perform functional, load, and compliance testing of Web Services.

Setup SoapUI to Test Salesforce Webservice

What is difference between Enterprise WSDL and Partner WSDL?

Here is difference between Enterprise WDSL and Partner WDSL.

Enterprise WDSLPartner WSDL
Strongly TypedLoosely Typed
Tied to a specific configuration of SalesforceUseful for any configuration of Salesforce
Changes if custom field or custom objects are added to your organizationDoes not changes if custom field or custom objects are added to an organization’ Salesforce configuration

Integrating with Salesforce using SOAP API | Enterprise & Partner WSDL


Check this post to know about SOAP Vs REST API.

Integration Patterns

In salesforce we have welcome Integration patterns.

Remote Process Invocation—Request and Reply ” : Salesforce invokes a process on a remote system, waits for completion of that process, and then tracks state based on the response from the remote system.

Remote Process Invocation—Fire and Forget ” : Salesforce invokes a process in a remote system but doesn’t wait for completion of the process. Instead, the remote process receives and acknowledges the request and then hands off control back to Salesforce.

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.

Remote Call-In ” : Data stored in Lightning Platform is created, retrieved, updated, or deleted by a remote system.

UI Update Based on Data Changes ” : The Salesforce user interface must be automatically updated as a result of changes to Salesforce data.

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

Please below recording to learn about. Salesforce Integration Patterns & Best Practices.

Further learning


Amit Chaudhary


  1. Reply
    Piyali says:

    All in one post! Good work.

  2. Reply
    Naveen Mosuru says:

    just WOW !

  3. Reply
    Naveen Mosuru says:


  4. Reply
    Sireesha Penumatsa says:

    Hi I am looking for any project explanation. can you please help me.

  5. Reply
    Abhi says:

    Hi Team..thanks for the reply but i have already went through this page…there are many more but nowhere the things are clearly described.I ll elaborate my question..
    Suppose I have to integrate an endsystem ABC with salesforce org SalesOrg .
    Case 1
    “SalesOrg” is the only org which has to be integrated with “ABC”.
    We do not expect any change to happen in future in the “SalesOrg” configuration or metadata.
    So in this case will the enterprise or partner or Both will serve the purpose or not?
    Case 2
    “SalesOrg” is expected to have some changes in the config/metadata and again this is the only org I want to integrate with ABC.
    Now there are two scenarios :
    If I am using partner WSDL then after changes I do not have to consume the WSDL again in my ABC org ….is this understanding correct?
    If I am using Enterprise WSDL then after changes I do not have to consume the WSDL again in my ABC org ….is this understanding correct?
    Case 3
    Now I have 3 3 orgs ie: “SalesOrg1”,”SalesOrg2”,”SalesOrg3”.
    In this case I shall be using the partner wsdl if I don’t want to build 3 different integrations for all the three orgs?

  6. Reply
    Tushar says:

    Really very happy to say,your post is very interesting to read.

  7. Reply
    PreludeSys says:

    This is probably the best, Thanks for sharing.

Post a comment