ajay_wkh_external data source and external objects

15
External Data Source and Objects WKH Session 12 March 2015 Presented By: Ajay Singh Ranawat

Upload: ajay-singh-ranawat-

Post on 08-Aug-2015

134 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ajay_WKH_External Data Source and External Objects

External Data Source and Objects WKH Session 12 March 2015

Presented By: Ajay Singh Ranawat

Page 2: Ajay_WKH_External Data Source and External Objects

Agenda

External Objects Introduction OData Source Introduction Basic Architecture of Lightning Connect Few OData supported sources Business Scenario Setting up External Data source & External Object Advantages and Limitations Apex Data Connector Questions and Answers

Page 3: Ajay_WKH_External Data Source and External Objects

Introduction to External Objects:

External Objects allow for data to be exposed to Salesforce but not persisted on the platform. External Objects essentially provide a wrapper around the oData protocol which initiate web service calls to retrieve the data as it’s presented on the screen or queried.

Data must be in format: oData Apex Connector framework

Data must be accessible on public network: Basic oAuth

Page 4: Ajay_WKH_External Data Source and External Objects

oData Source: From http://www.odata.org/:

Odata is a standardized protocol for creating and consuming data API’s. Odata builds on core protocols like HTTP and commonly accepted methodologies like REST. The result is a uniform way to expose full-featured data API’s.

An open protocol to allow the creation and consumption of queryable and interoperable RESTful APIs in a simple and standard way.

OASIS Odata Technical Committee, gave all the efforts for standardization. HTTP-based interaction. Atom or JSON representation Industry adoption: Microsoft, SAP

Page 5: Ajay_WKH_External Data Source and External Objects

Basic Architecture of Lightning Connect:

Page 6: Ajay_WKH_External Data Source and External Objects

OData Supported Data Sources:

1. Microsoft Dynamics

2. Microsoft SQL Server

3. Microsoft SharePoint

4. Microsoft SQL Server 2012 Reporting Service

5. Windows Azure Table Storage

6. SAP Net weaver Gateway

7. IBM WebSphere extreme Scale REST data service

8. Etc.

Page 7: Ajay_WKH_External Data Source and External Objects

Business Scenerio:

A large retail company looking to present their Customer Service Reps with the customers retail transactions from an on-premise Enterprise Resource Planning (ERP) system. How would we do this?

1.Load the data into Salesforce: There are tens of millions of records so will need to manage the volumes and archiving to mitigate data storage, the data will essentially be duplicated for the purpose of presenting it to the user.

2.Callout to a web service: Requires the external service to serve the data to Salesforce. Will need to define APIs and mechanism for presenting the data and custom UI for presenting this alongside the customer in Salesforce.

Both of these options are time consuming and involve a lot of effort and therefore cost. 

Page 8: Ajay_WKH_External Data Source and External Objects

Setting up Lightning Connect and External Object

1.Create a new Developer environment from https://developer.salesforce.com/signup. 

2.Go to Setup > Develop > External Data Sources.

3.Create new external data source. (We will need to reference the URI of the oData service we will be using. For the demo I recommend using the Free and Open Northwind oData Source: services.odata.org )

4.Select ‘Lightning Connect’ as the connection type

5.Enter the URI for the Northwind oData Source - http://services.odata.org/V3/Northwind/Northwind.svc/

6.After save click button to Validate and Sync. This option verifies that the service at the end of that URI can be understood, and if so will present a list of objects as defined by that service. This is a bit like importing a WSDL - you select the object you want and select sync. Salesforce then creates all the objects following the definition of the service.

Page 9: Ajay_WKH_External Data Source and External Objects

Hands On:

1. External Object ‘Invoices’ as a related list on Accounts

2. External Object Page Layout

3. Chatter on External Objects

4. External Object List Views

Page 10: Ajay_WKH_External Data Source and External Objects

When is External Data Source queried:

1. To use External Objects your data needs to be exposed as an oData source, Once it has been done you then configure your External Data Source

2. Salesforce queries the external data source via web service when:a) A user clicks an external object tab for a list view

b) A user views a record detail page of a parent object that displays a related list of child external object records

c) A user performs a global search in Salesforce or Salesforce1 mobile app

d) An external object is queried via the APIs, Apex, SOQL, or SOSL.

Page 11: Ajay_WKH_External Data Source and External Objects

Advantages:

1. Code Free Real Time Integration

2. Ability to interact with External Objects through Chatter and Salesforce1 mobile.

3. Native object capability is supported like related lists, list views, and page layouts.

4. External Objects are exposed to SOQL, SOSL, Apex, and APIs

5. Data is never stored in Salesforce but pulled in on demand through web services,

1. Reduced unnecessary (and expensive) limits and

2. Reduced Cost of data storage.

6. Exposed for Global Search

Page 12: Ajay_WKH_External Data Source and External Objects

Limitations:

1. Only 100 External Objects per Org.

2. The new Lightning Connect functionality is enabled in Developer Edition but customers will have to pay extra to use it in production. Pricing starts at $4000 per month per data source.

3. Org is limited to 10,000 OData queries per hour, with higher limits available to purchase.

4. Current release is read-only

5. Reporting is not available

6. Workflow and Triggers not available

Page 13: Ajay_WKH_External Data Source and External Objects

Sample Code for Apex Connector:

Page 14: Ajay_WKH_External Data Source and External Objects

Apex Connector: Extending DataSource.Provider: used basically for authorization and Connection

purpose.

Page 15: Ajay_WKH_External Data Source and External Objects

Thank you