Do you want to integrate data from external legacy systems in your Salesforce organization without storing it? In most cases integration with Salesforce is done with middleware tools known as ETL’s, ESB or Cloud integration platforms. These tools extract data from homogeneous or heterogeneous data sources, transform the data and duplicate it in Salesforce. At PwC we use middleware tools like Dell Boomi, Actian Data Integrator, APEX Data Loader and Jitterbit. These are used for complex data integration. In case you have just a couple of data flows, there is one technology for seamless integration that is easy and fast to use: Salesforce Connect.
With Salesforce Connect, no middleware is needed, it is a point-and-click set up, and it integrates the data in real-time. You can integrate tables from SAP® NetWeaver Gateway, Microsoft Dynamics® NAV, MS SharePoint and many other data sources in real time without writing a single line of code.
Before Salesforce Connect Set up
After Salesforce Connect Set up
Connecting to external legacy systems
Salesforce Connect enables you to connect Salesforce to external legacy systems like Oracle, SAP, DB2, Microsoft SharePoint in real-time, without making copy/duplicate of any single record in the Salesforce org itself. Instead of copying the data directly into your org, you can use external objects to access the data in real-time via web service callouts, without any single line of code.
You get a view of the data you need on-demand and fast.
It maps data tables in external systems to external objects in your Salesforce org. Like standard objects, you can access external objects via list views, detail pages, record feeds, custom tabs and page layouts. Relationships can be built between external objects and standard or custom objects in order to fetch data from different sources.
Sample Demo to connect to SAP
A step by step demo to get real-time data from SAP using this new Salesforce framework.
Use the following high-level steps to set up Salesforce Connect:
- Create the external data source(s)
- Create the external data objects and their fields
- Define relationships for the external objects
- Enable user access to external objects and their fields
- Set up user authentication
How to use Salesforce Connect
You connect to external data systems by creating an external data source in Salesforce (from set up) and passing an OData (Open Data Protocol) URL to the external system.
OData is a standard protocol that defines the best practices for building and consuming RESTful APIs. It’s a protocol used to retrieve data from systems like Oracle, SAP and SharePoint.
For more information about the OData protocol you can go here.
Salesforce validates the OData URL configured in the external data source parameters and synchronizes his meta data with the backend system diagram.
Keep in mind that only the metadata and the layout of the external tables are synchronized with Salesforce. The actual data itself is not duplicated.
1.1 Types of External Connections
In order to connect to external systems Salesforce Connect uses the following types adapter:
a) OData 2.0 adapter or OData 4.0 adapter (web service calls out): REST-based protocol
b) Salesforce adapter (standard Force.com REST API) connects directly to data that is stored in another Salesforce organization, no web service or OData needed.
c) Custom adapter created via Apex: Develop your own adapter with the Apex Connector Framework.
1.2 Types of External Connections
Can
At this moment, Salesforce connect is integrated with APIs, Chatter (no field tracking), Salesforce mobile app, global search, SOSL and SOQL queries, Apex, Visualforce, change sets, packages, tabs, layouts and Write (limited).
Cannot
Formula Fields, Workflow, Triggers, Reports and Analytics (limited) and Sharing are not yet available. Salesforce is working on new possibilities available in the coming releases.
1.3 Assumptions & constraints
We assume that the data from the backend system will be made available using the required adapter (i.e. OData).
This will be in charge of the external legacy system administrators.
The necessary access to the external system (user authentication) will be granted to the Salesforce user.
2 Step by step demo Salesforce Connect & SAP
2.1 Prerequisites
✓ SAP Environment with Create, Edit rights
✓ URL of Data exposed (available) in SAP using OData protocol
✓ Salesforce environment with admin rights
✓ Create External Data source
✓ Create External Data Objects
2.2 Scenario
From a SAP system, we’ll work through the steps to view SAP’s Sales Orders (Sales Orders exposed/published via OData protocol) in Salesforce using Salesforce Connect (in this demo we use the OData 2.0 adapter, but as mentioned before you can also use the OData 4.0 adapter).
2.3 Set up access to SAP
There is a public SAP server available that you can access by registering here and choosing the “Join us” option.
After your successful registration, you can log into SAP database in two ways:
A). by using this link – Enter your username and password
After a successful login, you are ready to work with SAP.
B). Use SAP GUI, by downloading it from the official SAP website here. Install the SAP GUI on your local machine and log in SAP by entering your credentials.
After a successful login, you are ready to work with SAP.
2.4 Create External Data source in Salesforce
From setup, create a new external data source by entering the following details as shown on the screenshot below.
Important fields
Type of Connection: Lightning Connect OData 2.0
URL: https://sapes4.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC
Connection Timeout: 120
Allow Create, Edit, and Delete: Checked
Format: AtomPub
Identity Type: Named Principal
Authentication Protocol: Password Authentication
And you have to enter your username and password of course.
Note that the option Allow Create, Edit and Delete is now available but it is limited and may require extra configuration from Salesforce and from the backend system.
If all settings are correct, you’ll be prompted with new external data source that you have to validate and synchronize with the SAP. By validating you will be asked to select the External object to add to the external data source.
Keep in mind that only the metadata is in Salesforce and the actual data itself is in SAP. Furthermore, the external objects linked to the external data source are automatically recognized and listed by Salesforce.
It is also possible to create the external objects manually from the Setup in Salesforce. But it’s better to leave it like this as all Salesforce fields are correctly mapped to the external objects’ fields.
Now we have external data source with its external data objects perfectly synchronized.
2.5 Create External Data Objects in Salesforce
This is done in the preview step. We have the Sales Order Header and the Sales order details (items) automatically created when the external data source was created and synchronized.
2.6 Viewing data in Salesforce
We have all we need to display the data Sales Order Header and the Sales order details/items. For this purpose, those two objects will be displayed as tabs in the custom app called Wholesales here. Displayed sales order Header:
Notice that in Salesforce the order 0000000002 has the value 27.244,84 USD.
If we go back to SAP and display the orderId 0000000002 we’ll have the OrderValue 27.244,84 USD too.
Go back to Salesforce and display by refreshing the page and look at OrderId 0000000002.
We can immediately (in real-time) see the change without duplicating the data!
2.7 Integrate External objects with standard or customer objects
After you’ve configured an external data source and defined external objects, you can integrate the external data into Salesforce using relationship fields.
Use the Indirect lookup relationship to link the external object Orders to the Standard object Account.
First define an external custom field on the Account and make it unique.
Then, you need to change the type of the CustomerId field from the external object into an Indirect lookup relationship.
Step 1: Choose the Account object.
Step 2: choose a related object
Select Customer_ID__c as the value of Target Field and click Next.
Now when you display an account you’ll be able to see its sales orders as related list.
Access data in real time via web service callouts
Instead of copying the data into your org, you can use external objects to access the data in real time via web service callouts.
With Saleforce Connect, you can integrate tables from SAP® NetWeaver Gateway, Microsoft Dynamics® NAV, MS Sharepoint and many other data sources in real time without writing a single line of code.
If you want to integrate your external legacy system with Salesforce Connect, you can contact us.