5. Punta Airlines
A small airline with growing sales
Basic Requirements – > Sell Tickets
• Visualize and manage current
flights and bookings in SF
• Purchases may occur both in SF
and Website
• Flights and Bookings data is
outside Salesforce
• Two way integration between
Salesforce and Website on real
time
6. Node Web App -
Redis DB
External REST API Salesforce Connect Salesforce Org
Text Text Text Text
Use Case Scenario
Elements Involved
10. Salesforce Connect
Framework
Seamless integration of external data
CRUD of data stored outside your Salesforce Org.
NO DATA REPLICATION/ Redundancy
Real time data access over external objects.
Always up to date.
Native Adapters – Point & Click Integration
Protocol-specific adapters:
Odata 2.0 / 4.0
Cross-org (Between Salesforce orgs)
Custom Apex Adapters
11. Salesforce Connect
Used when:
Large amount of data that
should not be stored in
Salesforce
Small amounts of data at
any one time.
Real time access is
crucial to get latest data.
12. Salesforce External Objects
Key Concepts and Features
Similar to custom objects.
__x extension.
Mapped to external data
tables in external
systems.
New object relationships:
External lookups.
Indirect lookups.
13. External Objects vs. Custom Objects
Features Custom Objects External Objects
Data stored in Salesforce org Yes NO
CRUD Yes YES*
Tabs / Layouts / Field Level Security Yes YES*
REST - SOAP API / SOQL – SOSL / Apex / Visualforce Yes YES*
Formulas / Workflow / Triggers / Reports Yes YES
Chatter Yes Yes*
Top Differences
15. Apex Connector Framework
Key Concepts & Capabilities
Set of classes and methods for creating external data sources.
DataSource namespace.
When OData & Cross Salesforce Org adapters are not suitable for the use case.
Based on REST – SOAP callouts.
Own custom adapter implementation.
Two Apex Classes need be extended for creating external data sources:
DataSource.Connection class.
DataSource.Provider class.
16. Apex Connector Framework
DataSource.Connection class
Obtain external system schema and CRUD
operations.
Methods to override:
sync().
query().
search().
upsertRows().
deleteRows().
Authentication capabilities.
Functional capabilities.
Methods to override:
getAuthenticationCapabilities ().
getCapabilities().
getConnection().
DataSource.Provider class
17. Apex Connector Framework
External IDs for Salesforce Connect External Objects
External object has the External ID standard field for unique identification.
The custom adapter’s code must declare the DataSource.Column named ExternalID.
Salesforce storages this value.
18. Apex Connector Framework
Support for Writable External Objects
Creating,updating and deleting external records are not perfect processes.
Insert(), update() and create() operations are not allowed for external objects.
Database.insertAsync().
Returns a SaveResult object with an identifier for the insert job.
19. Apex Connector Framework
Authentication for Salesforce Connect Custom Adapters
DataSource.Provider class declares authentication type:
Anonymous -> Support for Name Credentials
Basic
Certificate
OAuth
DataSource.ConnectionParams depends on the Identity Type defined in Salesforce.
Name Principal –> From external data source definition.
Per User –> From current user that invokes the query or search.