In this blog post, we talk about what is Salesforce Integration? and how to integrate Salesforce 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 this session, we covered the on-the-platform option like Outbound messages, Apex Callouts, and Salesforce connect and Off platform options like Heroku Connect, Steaming Api, Change Data Capture, Polling.
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.
Check Salesforce Integration Guide to learn more.
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.
SOAP API | REST API |
Relies on SOAP protocol | Relies on REST architecture using HTTP |
Transports data in XML | Transports data in JSON or XML |
Highly structured/ typed | Less structured? Less bulky data |
Handles large data loads | Works well with JavaScript |
Designed with large enterprise application in mind | Designed with mobile devices in mind |
Difference between JSON Vs XML ?
Here is some difference betweek JSON and XML. Check this post for more detail.
JSON | XML |
JavaScript Object Notation has a type like String, number, Object, Boolean | Extensible markup language is type less, and should be string |
It is a way of representing objects | It is a markup language and uses tag structure to represent data items |
Retrieving value is easy | Retrieving value is difficult |
It does not provide any support for namespaces. | It supports namespaces. |
It is less secured | It is more secure than JSON |
Guidelines: Key – Enclosed in double Quotes(String) Value – Can be any datatype {} – Object [] – Array , – Separates data element within Object | Guidelines: 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 options are available in Salesforce?
There are lots of Integration option are available in Salesforce. Some of the are below.
API Name | Protocol | Data Format | Communication |
REST API | REST | JSON, XML | Synchronous |
SOAP API | SOAP (WSDL) | XML | Synchronous |
Chatter REST API | REST | JSON, XML | Synchronous (photos are processed asynchronously) |
Analytics REST API | REST | JSON, XML | Synchronous |
Bulk API | REST | CSV, JSON, XML | Its Asynchronous. Handle large data loads with batching. |
Metadata API | SOAP (WSDL) | XML | Asynchronous. Retrieve, deploy, and modify metadata. |
Streaming API | Bayeux | JSON | Asynchronous. Push notifications from Salesforce
to subscribing applications/entities (replaces polling). |
Apex REST API | REST | JSON, XML, Custom | Synchronous |
Apex SOAP API | SOAP (WSDL) | XML | Synchronous |
Tooling API | Build
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?
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 WDSL | Partner WSDL |
Strongly Typed | Loosely Typed |
Tied to a specific configuration of Salesforce | Useful for any configuration of Salesforce |
Changes if custom field or custom objects are added to your organization | Does not changes if custom field or custom objects are added to an organization’ Salesforce configuration |
Integrating with Salesforce using SOAP API | Enterprise & Partner WSDL
SOAP vs REST
Check this post to know about SOAP Vs REST API.
Integration Patterns
Please check below recording to learn about. Salesforce Integration Patterns & Best Practices.
All in one post! Good work.
just WOW !
WOW
Hi I am looking for any project explanation. can you please help me.
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?
Really very happy to say,your post is very interesting to read.
Thanks
This is probably the best, Thanks for sharing.
Thanks for sharing such a great blog this is from activesystems.ph
Hi,
I am a complete non tech person and would like to know how can i connect to sales force through an application that my team have built. So i have an application called ABC and i want to add a link into that application called Dashboard. Once the user clicks on the link, i want them directed to sales force where i have my dashboard. The team is using auth0 as an authentication tool and i want a seamless connection between the two application making sure that the end user does not know that he has been redirected to another application.
This is probably the best blog where we get all the integration information at one place. Kudos for the contributors and Amit Chaudhary.
Thanks
This is probably best blog for complete integration information. Kudos to the contributors.
Thank you so much. Glad you like this post
Glad this helped you to learn about Salesforce Integration