All you need to know about Salesforce connect.

Recently I got a wonderful opportunities to present salesforce connect to elastic and creative salesforce enthusiastic crowd at India Dreamin and Salesforce Navi Mumbai User group. After getting an overwhelming response from the community I thought it will be my honor to write a blog that will be helpful to #SalesforceOhana. So in this blog I will be presenting my leanings and knowledge about Salesforce connect. Session slides are available here.

Are you looking for hassle free way to integrate your salesforce system with external system without writing a single line of code ?  Buckle up! I’ll give a very brief intro to Salesforce connect and then get straight into showing actual use cases with real time integration, of course, without writing a single line of code. This blog will focus on how Salesforce Connect can be used, demo of real time data integration with OData database and I’ll share valuable consideration for all stages of development (planning, configuration, testing, and deployment).

[Update] : If you preparing Platform Developer II Or Any Domain Architect certification then feel free to refer below Articles,

Platform Developer II 

Salesforce Sharing & Visibility Designer Certification

What is Salesforce Connect ? SC.JPG

“Salesforce Connect is a Salesforce standard framework that enables you to view, search, and modify data that’s stored outside your Salesforce org ”

Even though the data is stored outside your org, Salesforce Connect provides seamless integration with the platform. External objects are available to Salesforce tools, such as global search, lookup relationships, record feeds, and the Salesforce1 app without writing a single line of code.

Salesforce Connect lets your Salesforce org access data from a wide variety of external systems. You can integrate tables from SAP® NetWeaver Gateway, Microsoft Dynamics® NAV, and many other data sources in real time without writing a single line of code. Previously, the only way to integrate external data with Salesforce was to use extract, transform, and load (ETL) tools. That process is time consuming and requires you to copy data into your org that you might never use or quickly becomes stale. In contrast, Salesforce Connect maps data tables in external systems to external objects in your org.

When to use Salesforce connect ?

Few months back, I have been allocated to new project and while designing the system as well as integrating Salesforce with other system I faced below challenges,

  • External System have millions of data – There was a subsisting system which needs to be integrated with Salesforce and it wasn’t facile to replicate the entire external system into Salesforce. A Substantial amount of data that we didn’t want to replicate into Salesforce Org.
  • Real-time access to latest data – One of the most critical requirement was to keep both system in real time sync.
  • External System is Reliable, Scalable and Secure Other system is source of truth and its almost maintenance free.
  • Two way CRUD Operation – Two way Create/ Update / Delete in real time.
    External system have dependency with multiple System
  • 360-degree, real-time view – System users were asking for 360-degree view of external data with associated Salesforce object.
  • Minimum Development efforts – Obviously every client ask for faster development with minimum efforts.

After analyzing all the factors I proposed Salesforce connect which worked absolutely amazing in our case.

Power of salesforce connect


Example Architecture :


Let the Demo Begin

Before jumping to the Point and click configuration, lets understand the use case first,


As shown in above blueprint, Salesforce needs real time access to the data stored in People, Airlines and Airport objects stored in external System.

Setup >>External Data Sources >> New External Data Source

Setup Gif.gif


As shown in above gif, I have configured the Salesforce connect for Airlines Management External system (hypothetical example). For demo purpose I am using my Developer Org and haven’t added any password protection to Odata 4.0 endpoint of External System, but when you are dealing with real data its recommended to use Security check. External objects are similar to custom objects, except that they map to data located outside your Salesforce org. External object data is always up to date. Salesforce Connect provides a live connection to external data rather than a copy that consumes storage and must be regularly synced. Accessing an external object fetches the data from the external system in real time.


Note : You must have observed options displayed in the above image in setup gif. Let me tell you something very important here, if you want make bi-directional update, Writable External Objects checkbox should be checked. But if your external system have High Data volume and you are checking High Data Volume checkbox, in this case bi-directional update isn’t allowed and Writable External objects checkbox will be unchecked automatically.

Now we have external objects in org, we have to create Tab to view the data available in External Object,

ListView Gif.gif

Record Detail Page and List view

As shown in above gif, list view and record view is automatically created by salesforce like custom object, and data is accessed in real time from External system whenever required.

Now let’s update the record using Edit button,

Edit Gif

Edit External Object Record

Note : Edit button will be visible if and only if Writable External objects checkbox is checked.

How it works? – oData

Utilizing a standard called OData, Lightning Connect allows for data that resides outside of Salesforce to be viewed in real-time inside of Salesforce. When doing a Salesforce connect (Lightning Connect) integration you would simply create an External Data Source within the setup menu of Salesforce and define a datasource from a service URL.


Lightning Connect (Salesforce connect) – OData

Once defined Salesforce makes a call out to the data source defined and brings back a list of all the tables in the external system that are available. Let me remind you, this is all being done through point and click functionality.

Once you authenticate and get the list of tables from the external system you select one or more to sync. Once its selected to sync it creates what is called an External Object automatically. All the field names and labels come over from the source system but you can change those if youd like. At this point we have a new object that is treated like a custom object in Salesforce and we can create and define relationships to already existing data objects within the platform.

Want to know more

External objects are also available to Apex, SOSL, SOQL queries, Salesforce APIs, and deployment via the Metadata API, change sets, and packages. Salesforce makes the HTTP request and gets the HTTP response, each time the record is retrieved.

Want to know more 😃

Here I will answering all the questions that I got from Salesforce Einstein’s while presenting this topic in India Dreamin as well as in other developer meetups,

Q : Hold on, I have question👆- Is it possible to update the External objects records using Apex ?

Yeah, we can use External CRUD Operations for the same,

Apex Edit

Q : Wow! This seems to be an amazing feature, but Do I will be able to Report on External object Data ?

Absolutely yes! After Salesforce Winter ’17 Release, it’s possible to create a report on the External objects Data with some consideration.

Run reports on Salesforce Connect external objects to get a seamless view of data across system boundaries. External objects behave similarly to custom objects, except that they map to data that’s stored outside your Salesforce org. This feature is available in both Lightning Experience and Salesforce Classic.

Report Gif.gif

Creating a Report on an External Object

Reports that include external objects have special behaviors and limitations. Because this report includes an external object, network latency and the availability of the external system can cause the report to run slowly. Also, the report fetches only up to 2,000 records for the primary object. However, the report’s total number of rows can be greater or less than 2,000, depending on how many child records are fetched. Read more..

Q : We are using Chatter for years, will it work with external objects as well ?

Ahhh! It will 😇 Here is the demo for you..

Chatter Gif

Chatter with External Object

Q : What if we are using any other protocol than Odata 2.0 or Odata 4.0, is there any way to still connect external system to SF ?

Yep, we can use Apex connector Framework – As part for standard Lightning connect functionality we would be relying on oData as protocol for communications, but if our customers/partners are using their own protocol or their proprietary standards, so salesforce provides Apex connector framework. This allow us to develop our own connectors to get the data in our format with defined protocols.

  • Develop your own Custom Adapter in Apex using Apex Connector Framework.
  • Apex manages the Metadata creation
  • Provide your implementation for your data service
  1. Sync
  2. Query
  3. Search
Code Snippet.JPG

Apex connector Example – Code Snippet


Q : So far so good, but Is it possible to relate external object with standard object/ custom Object or vice-versa ?

That’s an amazing question. Yes, we can create Indirect Lookup or External Lookup to create relationship between standard Object / custom object / External object with External object.

Lookup Gif.gif

Lookup with External Object

As shown in above GIF, I am extending the scenario described above and creating relationship between Case Object and Airport External Object. Read More .. 

Don’t Miss These Considerations


  • Do not support Salesforce Automations.
  • External object Metadata is external system driven.
  • Enable Separate Loading of Related Lists of External Objects.
  • Formula and Roll-up Summary fields not supported.
  • Field History tracking not supported.
  • Notes and Attachment not supported.
  • From Winter ’17 Report is supported with Data considerations.
  • 10,000 OData callouts per hour for Enterprise, Performance, and Unlimited Editions. Higher limits are available on request.
  • 1,000 OData callouts per hour for Developer Edition.

Salesforce connect :



Connect custom Adapter:


Limits for Salesforce connect – oData 2.0 and 4.0:


Good luck folks and feel free to tweet me @JitenJoysar if you have any questions! That’s it for this post, See you in next blog.

Keep Calm and Be coder!!  Thank you.

See you soon in next blog 😎 



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s