Introduction to External Objects and the OData Connector
-
Upload
salesforce-developers -
Category
Technology
-
view
3.125 -
download
1
description
Transcript of Introduction to External Objects and the OData Connector
![Page 1: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/1.jpg)
Using External Objects for IntegrationExpose OData or proprietary data in your Salesforce org
Alexey Syomichev, Salesforce.com, Software Architect@syomichev
![Page 2: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/2.jpg)
Alexey SyomichevArchitect@syomichev
![Page 3: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/3.jpg)
Lawrence McAlpinPMTS@lmcalpin
![Page 4: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/4.jpg)
Safe HarborSafe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
![Page 5: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/5.jpg)
An Alternative to ETL▪ Extract-Transform-Load is very
popular for data synchronization▪ Synchronized dataset
goes stale immediately
External Data Source allows data interaction without physical movement
![Page 6: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/6.jpg)
Session Outline▪ Introduction to External Data Source and External Objects
▪ SAP Orders over OData demo
▪ OData ecosystem
▪ Advanced External Objects
▪ Apex Connector Framework
▪ Open discussion
![Page 7: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/7.jpg)
What is an External Object?A tool to make data outside of Salesforce visible within our Platform.
▪ Data must be in a format we understand▪ OData
▪ Apex connector framework
▪ Data must be accessible on the public Internet▪ Basic
▪ OAuth
![Page 8: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/8.jpg)
What can I do with an External Object?Standard and Custom
Objects External Objects
Write X
Read X X
REST and SOAP API X X (read only)
Custom Tabs and Details X X (read only)
SOQL X X (read only, no aggregation, no tracking)
Search and SOSL X X
Reports and Analytics X
![Page 9: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/9.jpg)
External Data Sources
![Page 10: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/10.jpg)
External Objects__x extension
External ID
External Data Source
Fields have External Alias
![Page 11: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/11.jpg)
Demo: OData connector
Let’s consider an organization that
▪ maintains Account info in Salesforce,
▪ but uses SAP for sales order tracking.
![Page 12: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/12.jpg)
SOQL ☺Support basic queries (SELECT, WHERE, LIMIT, OFFSET)
Support date literals
Accuracy limited by your external data source
![Page 13: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/13.jpg)
SOQL ☹No aggregation (GROUP BY, HAVING, COUNT())
No object tracking (FOR VIEW, FOR REFERENCE)
![Page 14: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/14.jpg)
SOSL▪ Support basic queries (FIND, IN, RETURNING, WHERE, LIMIT,
OFFSET)
▪ Accuracy limited by your external data source
![Page 15: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/15.jpg)
OData Specification▪ From http://www.odata.org/ :
OData is a standardized protocol for creating and consuming data APIs. OData builds on core protocols like HTTP and commonly accepted methodologies like REST. The result is a uniform way to expose full-featured data APIs.
▪ Standardization effort is led by OASIS OData Technical Committee
▪ URIs for resource identification
▪ HTTP-based interaction
▪ Atom or JSON representation
▪ Industry adoption: Microsoft, SAP
![Page 16: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/16.jpg)
OData Ecosystem: LibrariesProducer libraries at http://www.odata.org/libraries/
• Java:
• odata4j
• Apache Olingo
• .NET:
• WCF Data Services
• Visual Studio LightSwitch
• PHP: odataphpprod
• Ruby: https://github.com/lmcalpin/odata_server
• Node.js:
• datajs
• JayData
![Page 17: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/17.jpg)
OData Ecosystem: Tools And Products• Microsoft Dynamics
• Microsoft SQL Server
• Microsoft Sharepoint
• Microsoft SQL Server 2012 Reporting Services
• Windows Azure Table Storage
• SAP Netweaver Gateway
• IBM WebSphere eXtreme Scale REST data service
• Jboss Teiidhttps://docs.jboss.org/author/display/TEIID/OData+Support
![Page 18: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/18.jpg)
Spoilers!Don’t forget the safe harbor statement.
Lookup RelationshipsLookup relationships can be established between internal and external objects.
(coming in Spring‘14)
![Page 19: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/19.jpg)
External Lookup Relationships
Target domain must be an external object
The lookup field will be correspond to External IDs in the related object
![Page 20: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/20.jpg)
External Lookup
![Page 21: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/21.jpg)
External Lookup
![Page 22: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/22.jpg)
External Lookup
No lookup popup dialog (yet)
![Page 23: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/23.jpg)
![Page 24: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/24.jpg)
(Standard) Lookup Relationships
Target domain must be an internal(standard or custom) object
The lookup field must hold valid 15-digit case sensitive salesforce.com object IDs
![Page 25: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/25.jpg)
Indirect Lookup Relationships
Target domain must be an internal (standardor custom) object
The lookup will find records that matchon a non-key field
Must be an “Is External Id” field
![Page 26: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/26.jpg)
Relationship QueriesGiven a Product child and external object Supplier parent:
Find all products from a given supplier:SELECT Name FROM Product2 WHERE supplier__r.companyName__c = ‘Tardis Biscuits, Ltd.’
Find active products for each of our suppliers:SELECT companyName__c, (SELECT Name FROM Products__r WHERE IsActive = true) FROM Supplier__x
![Page 27: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/27.jpg)
Apex Connector FrameworkWhen exposing legacy data in OData format is not practical, force.com platform offers a development toolkit to build custom external connectors in Apex.
▪ The SDK consists of Apex interfaces and helper classes that allow Force.com platform developers to build their own external connectors;
▪ These connectors become available as External Data Source types and can be used to sync external objects in exactly the same way as any other external data source;
▪ Objects brought it by Apex connector can be used in the same way as any other external object;
![Page 28: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/28.jpg)
Apex Connector FrameworkLet’s build a Bing search connector together
1.Create class BingDataSourceConnection
- Implements sync(), query(), search()
2.Create class BingDataSourceProvider
- Declares capabilities, authenticates new connections
3.Create a new External Data Source
- Bing is now available as a data source type!
![Page 29: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/29.jpg)
Search and SOSLFIND {uncle bob} RETURNING Product__x
{"attributes"=>{"type"=>"Product__x", "url"=>"/services/data/v27.0/sobjects/Product__x/7"}, "ExternalId"=>"7", "DisplayUrl"=>"http://gallifrey.internal.salesforce.com/OData/Product(7)", "id__c"=>7}
![Page 30: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/30.jpg)
LimitsAll normal Apex limits plus some limits specific to external data:
Limit Default
Total queries per org per hour 2000
Concurrent queries per org 10
Concurrent queries per app server 100
Service response size 4MB
Total result set size 8MB
![Page 31: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/31.jpg)
Alexey Syomichev
Architect,@syomichev
Lawrence McAlpin
PMTS,@lmcalpin
![Page 32: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/32.jpg)
We want to hear from YOU!
Please take a moment to complete our session survey
Surveys can be found in the “My Agenda” portion of the Dreamforce app
![Page 33: Introduction to External Objects and the OData Connector](https://reader033.fdocuments.us/reader033/viewer/2022061209/548c4ef5b47959ec0c8b6312/html5/thumbnails/33.jpg)