SlideShare a Scribd company logo
MULESOFT LONDON
MEETUP. FEBRUARY 2020.
https://www.paceintegration.com/
connect@paceintegration.com
Contact Pace Integration:
THE COMMUNITY.
Signup at
https://meetups.mulesoft.com/london/
Open to everyone
Learn and share
Interactive
Build your network
SLIDESHARE + LINKEDIN
Material available afterwards on
SlideShare.
ENGAGE ON SOCIAL
MEDIA J
#MULESOFTMEETUP
@PACEINTEGRATION
ASYNC API
Hybrid
Integration
Patterns
Centre for
Enablement
B2B
Integration
API
Enablement
– start small,
plan big
GREAT
TOPICS
Anypoint
Platform
DevOps
Tooling with
Anypoint
RAML 1.0
API Led
Connectivity
Anypoint
Platform
Crowd
Release
SaaS
Integration
Single view
of Customer
API Security
The
Connected
Enterprise
WHO WANTS TO BE A…
PRIZES!
OFFICIAL MULESOFT TRAINING
ADAM
MAGUIRE WILSON
FAMOUS
FACES.
SEAN YOUNG MICHAEL
JAKEMAN
PIYUSH
PATEL
KA MAN
ALEX
THEEDOM
Miguel
Ángel Chuecos
VIKAS
SINGH Integration Program Manager
Tata Consultancy Services
A Seasoned Consultant with an interest in
Business Agility and Enterprise Architect to
bridges the gap between technology and
business through automation and integration
that unlocks true business value.
PAWAN
GUPTA Integration Architect
Tata Consultancy Services
An Integration Architect involved in the
Solution design, architecture, development
and implementation. Always keen to explore
and learn new technology to give advantage
to business.
10
Oh Data! Martin Gardner
Solution Principal at Slalom
How I learned to stop worrying and
love integrating Salesforce with the
Mulesoft Odata API Kit
ABOUT ME
• 16 years in CRM
• 8 years in Salesforce
• Data Integration and migration has been a theme
throughout my career
• I love data
• 6 x Salesforce Certified
• Mulesoft Certified Developer Level 1 Mule 4
• https://www.linkedin.com/in/martingardner/
• martin.gardner@slalom.com
Agenda • Problem Statement & Solution Design
• A very short introduction to OData
• Salesforce Connect
• Mulesoft OData API Kit
• Translating Salesforce OData Query Parameters
• Putting it all together
• Summary
Problem
Statement
As a Salesforce user I want to view
the bank account transactions for the
accounts I own from within the
Salesforce user interface so that I
don’t have to login to the back-office
banking system.
As a System owner I want to store all
accounts’ transactions outside
Salesforce so that I avoid exceeding
my Salesforce storage limits.
Solution
Design
Salesforce
External
Object
Mulesoft
Banking
Platform
HTTPS OData
Request
HTTPS OData
Response
SOAP Request
SOAP Response
Transaction
List
User
App Flow
OData
OData (Open Data Protocol)
• Defines best practices for building and consuming RESTful APIs
• Response Headers
• Status Codes
• HTTP methods
• URL conventions
• Media types
• Payload formats
• Query options
• Tracking changes
• Defining functions/actions for reusable procedures, and sending
asynchronous/batch requests
• https://odata.org
• Usually used to expose databases as RESTful services.
OData key features
• Feeds : Collections of typed Entries
• Entry: Represents a structured record with a key that has a list of Properties
• Properties: Primitive or complex types
• Links: Connect entries into a hierarchy of related entries and feeds.
• Service Operations: Simple service-specific functions
• Service Metadata Document
• Describes the data source metadata
• Allows clients to discover the top-level feeds
• Available at the service root URI as Atom or JSON
OData Operations
• Retrieving the Service Document
• GET https://services.odata.org/OData/OData.svc/$metadata
• Retrieving feeds
• Request
• GET /OData/OData.svc/Products HTTP/1.1 Host: services.odata.org
accept: application/atom+xml,application/xml DataServiceVersion: 1.0
MaxDataServiceVersion: 2.0
• Response
• HTTP/1.1 200 OK Content-Length: 5685 Date: Sat, 27 Feb 2010 20:03:28 GMT
Content-Type: application/atom+xml;charset=utf-8 DataServiceVersion: 1.0;
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <feed
xml:base="https://services.odata.org/OData/OData.svc
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns="http://www.w3.org/2005/Atom"> <title type="text">Products</title>
<id>https://services.odata.org/OData/OData.svc/Products</id> <updated>2010-02-
27T20:03:28Z</updated> <Link rel="self" title="Products" href="Products" />
<Entry> ... </Entry> <Entry> ... </Entry> <Entry> ... </Entry> </feed>
Salesforce
Lightning
Connect
Salesforce Lightning Connect
• A framework for viewing, searching and modifying data that is stored outside a
Salesforce org.
• No need for ETL
• Data does not sit in Salesforce and consume data storage on platform
• Use when
• You have large volumes of data that you don’t want to copy to Salesforce
• You need small amounts of data at any one time
• You need real-time access to the latest data
• You want to display the data in your Salesforce org.
• Salesforce Lightning Connect has connectors for OData 2.0 and OData 4.0
• Trailhead Module
• https://trailhead.salesforce.com/en/content/learn/modules/lightning_connect/lightn
ing_connect_introduction
Mulesoft
OData API
Kit Extension
Builds services from the entity data
model (EDM) written in RAML
Supports OData 2.0 (not 4.0)
Prerequisites
• OData Plugin
• Mule EE 4.1.1 and later
• Anypoint Studio 7.1.4 and later
• Maven
https://docs.mulesoft.com/apikit/4.x
/creating-an-odata-api-with-apikit
Mulesoft API Kit Extension
• Define the API in RAML first.
• Use the Alt Menu -> Mule -> Generate Flows from REST API to generate the flow
skeleton.
• Must set the version on the HTTP Listener rather than in the configuration otherwise the
API Kit extension doesn’t initialize properly.
<http:listener config-ref=”http-listener-config” path=“/v1/*”>
Translating
OData Query
parameters
We must transform the query
parameters to make them work for
the underlying service. The example
from Mulesoft works for a MySQL
database.
The following examples are for a
SOAP web service.
To keep our app agnostic of the fields
in the SOAP service we use XQuery to
transform the payload using our
select, filter, orderby, top, skip, and
limit variables.
OData Query Parameters
OData uses query parameters to provide operations to our app. These are the operations we need
for a read-only service.
• select : Defines which columns or fields in the entity to return.
• filter : Defines the ‘WHERE’ clause for the query to restrict the records returned based on
criteria.
• orderby : Defines the sort order of the result set.
• top : Defines the number of records to return in the first page i.e. TOP 10 returns the first 10
records based on the orderby.
• skip : Defines how many of the records at the top of the result set to ignore. This is used by the
client to page through the result set.
• limit : Defines the maximum number of records to return across all pages.
Translating Query Parameters : Select
Contains a comma separated list of fields to return.
A * in the select parameter indicates that all fields should be returned.
For our app to work we turn the * into a list of specific fields so we call the service and use this dataweave to
set a variable called select.
%dw 2.0
output text/plain
import * from dw::core::Objects
var data = if (payload != null) payload[0] else []
var names = if (typeOf(data) as String == “Object” nameSet(data) else []
var select : String = vars.select match {
case select if (select is String and select != ”” and select !=”*”) -> select as String
case “*” -> joinBy(names, ”, “) as String
else -> joinBy(names, “, ”) as String
} default joinBy(names, ”, “) as String
---
select
Translating Query Parameters : Filtering
Salesforce has a few curious ways of implementing these filters.
For example instead of contains it uses indexof to find a given string in a field
We translate the filter operators from words into operator characters, i.e. eq -> =
We translate datetimeoffset to xs:date format
var odataFilterToXQFilter = (odatafilter) -> (( odatafilter replace ”eq null” with “= ‘’”
replace /(?i)indexof((’*?|”*?)(w*?)(’*?|”*?),((’*?|”*?)(w*?)(’*?|”*?)))((s*?)ne(/s*?)-1)/
with (“fn:contains(“ ++ $[2] ++ “,” ++ $[4] ++ “)”)
replace “ne null” with “!= ‘’”
replace “ eq “ with “ = “
replace “ ne “ with “ != “
//Further replacements of operators omitted
replace /(?i)(datetimeoffset’)(d{4,4}-d{1,2}-d{1,2})Td{1,2}:d{1,2}:d{1,2}(Z)(‘)/ with |( “xs:date(‘” ++
$[2] ++ $[3] ++ ”’)”)
) splitBy ” “
map (item, idx) -> (
if(names contains item ) “$tran/” ++ item else item
)
) joinBy “ “
Translating Query Parameters : Ordering
The default ordering for both Salesforce and OData is ascending.
The orderby parameter contains a comma separated list of fields with or without sort order indicators i.e.
name asc, date descending
Each ordering has two possible tokens asc, ascending and desc, descending
var odataOrderToXOrder = (odataOrderBy) -> (
( odataOrderBy replace “, ” with “ , “
replace “asc” with “ascending”
replace “desc” with “descending”
) splitBy(/s/) map (item, idx) -> (
if ( names contains item ) “$tran/” ++ item else item
)
) joinBy “ “
Translating Query Parameters : XQuery
The results of the previous steps are now used to construct an XQuery FLWOR expression to transform our
payload.
odataFilterToXQFilter is used to transform the OData filter into a form usable by XQuery.
odataOrdertoXQOrder is used to transform the OData orderby parameter into a form usable by XQuery.
The resulting string is stored in a variable and passed to an XML XQuery transform step.
---
‘xquery version “3.0”;
declare variable $document external;
<transactions>
{
for $tran in $document/transactions/transaction
where ‘ ++ odataFilterToXQFilter(vars.filter) ++ ‘
order by ‘ ++ odataOrderToXQOrder(vars.orderby) ++ ‘
return $tran
}
</transactions>’
Translating Query Parameters : Selecting
and Paging
The previous steps have given us a payload that contains the correct full set of records for the given query
parameters.
The final step is to apply the paging parameters to return the correct subset of records and fields to the client.
For this we use the following dataweave on our payload.
%dw 2.0
output application/json
var transactionCount : Number = sizeOf(payload default [])
var rangeStart : Number = if(vars.skip > transactionCount) transactionCount else vars.skip
var lastIndex : Number = vars.skip + (vars.top -1)
var rangeEnd : Number = if(lastIndex >= transactionCount) transactionCount -1 else lastIndex
---
{
“entries” : if(not isEmpty(payload)) ( payload[rangeStart to rangeEnd] map ( //This filters the record set
$ filterObject (( value, key) -> vars.select contains(key))) // This selects the fields to be returned
) else []
}
Putting it all
together
Putting it all together
• Mulesoft
• Import the example project
• Create a new app using the OData API Kit extensions
• Look out for the version: it must be specified on the HTTP Connector directly
• Implement flows for each entity and operation
• Translate OData query parameters to apply to SOAP XML documents
• Deploy to Anypoint Cloud Hub so it is visible to Salesforce
• Salesforce External Service
• Use the Service Document to create the external object
• Use AtomPub not JSON as Salesforce doesn’t seem to work with JSON
• Use the OData test kit to check the connection and queries
• Add an indirect lookup to link the data to a parent record in Salesforce
• Add the related list to the page layout
Summary
Data visible in Salesforce
Data stored externally
Data presented in real-time
Salesforce
External
Object
Mulesoft
Banking
Platform
HTTPS OData
Request
HTTPS OData
Response
SOAP Request
SOAP Response
Transaction
List
User
Dataweave and
XQuery magic in here
Questions?
Resources
• Mulesoft
• Mulesoft OData API Kit documentation : https://docs.mulesoft.com/apikit/4.x/creating-an-odata-api-
with-apikit
• OData API Kit example project
• https://docs.mulesoft.com/apikit/4.x/_attachments/apikit-odata-example-master.zip
• Salesforce External Service
• Trailhead Module : https://trailhead.salesforce.com/content/learn/modules/lightning_connect
• Trailhead Project : https://trailhead.salesforce.com/en/content/learn/projects/quickstart-lightning-
connect
• External Objects Documentation : https://developer.salesforce.com/docs/atlas.en-
us.object_reference.meta/object_reference/sforce_api_objects_external_objects.htm
• OData
• Documentation: https://www.odata.org/documentation/
• Reference Services: https://www.odata.org/odata-services/
• XQuery
• XQuery 3.0 documentation : https://www.w3.org/TR/2014/REC-xquery-30-20140408/
• FLWOR : For, let, where, order by, return https://en.wikipedia.org/wiki/FLWOR
https://www.paceintegration.com/
connect@paceintegration.com
Contact Pace Integration:
THANK YOU!

More Related Content

What's hot

Connecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESBConnecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESB
Jitendra Bafna
 
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
Jitendra Bafna
 
Mule soft meetup_charlotte_4__draft_v2.0
Mule soft meetup_charlotte_4__draft_v2.0Mule soft meetup_charlotte_4__draft_v2.0
Mule soft meetup_charlotte_4__draft_v2.0
Subhash Patel
 
MuleSoft Manchester Meetup #2 slides 29th October 2019
MuleSoft Manchester Meetup #2 slides 29th October 2019MuleSoft Manchester Meetup #2 slides 29th October 2019
MuleSoft Manchester Meetup #2 slides 29th October 2019
Ieva Navickaite
 
MuleSoft Meetup Virtual_ 2_Charlotte
MuleSoft Meetup Virtual_ 2_CharlotteMuleSoft Meetup Virtual_ 2_Charlotte
MuleSoft Meetup Virtual_ 2_Charlotte
Subhash Patel
 
Meetup_Bangalore_Rajesh
Meetup_Bangalore_RajeshMeetup_Bangalore_Rajesh
Meetup_Bangalore_Rajesh
D.Rajesh Kumar
 
Rtf v2 ingress muleSoft meetup self managed kubernetes
Rtf v2 ingress muleSoft meetup self managed kubernetesRtf v2 ingress muleSoft meetup self managed kubernetes
Rtf v2 ingress muleSoft meetup self managed kubernetes
Sandeep Deshmukh
 
LA November Meetup (Setting up VM/Bare Metal Runtime Fabric)
LA November Meetup (Setting up VM/Bare Metal Runtime Fabric)LA November Meetup (Setting up VM/Bare Metal Runtime Fabric)
LA November Meetup (Setting up VM/Bare Metal Runtime Fabric)
RohitKumarMalik
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_final
Akshata Sawant
 
NYC MuleSoft Meetup 2019 Q2- MuleSoft for Mobile Applications
NYC MuleSoft Meetup 2019 Q2- MuleSoft for Mobile ApplicationsNYC MuleSoft Meetup 2019 Q2- MuleSoft for Mobile Applications
NYC MuleSoft Meetup 2019 Q2- MuleSoft for Mobile Applications
Gean Martinez
 
Agile integration workshop
Agile integration workshopAgile integration workshop
Agile integration workshop
Judy Breedlove
 
Mule soft Meetup #3
 Mule soft Meetup #3 Mule soft Meetup #3
Mule soft Meetup #3
Gaurav Sethi
 
Exposing Web Service (CXF) With Mule ESB
Exposing Web Service (CXF) With Mule ESBExposing Web Service (CXF) With Mule ESB
Exposing Web Service (CXF) With Mule ESB
Jitendra Bafna
 
Introduction to Mulesoft
Introduction to MulesoftIntroduction to Mulesoft
Introduction to Mulesoft
venkata20k
 
Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021
NeerajKumar1965
 
Resilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIsResilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIs
VMware Tanzu
 
Automate mule deployments with github actions and travis ci
Automate mule deployments with github actions  and  travis ciAutomate mule deployments with github actions  and  travis ci
Automate mule deployments with github actions and travis ci
NeerajKumar1965
 
VMware Tanzu Application Service as an Integration Platform
VMware Tanzu Application Service as an Integration PlatformVMware Tanzu Application Service as an Integration Platform
VMware Tanzu Application Service as an Integration Platform
VMware Tanzu
 
Warsaw MuleSoft Meetup #6 - CI/CD
Warsaw MuleSoft Meetup  #6 - CI/CDWarsaw MuleSoft Meetup  #6 - CI/CD
Warsaw MuleSoft Meetup #6 - CI/CD
Patryk Bandurski
 
Deep Dive into Salesforce APIs
Deep Dive into Salesforce APIsDeep Dive into Salesforce APIs
Deep Dive into Salesforce APIs
NeerajKumar1965
 

What's hot (20)

Connecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESBConnecting Apache Kafka With Mule ESB
Connecting Apache Kafka With Mule ESB
 
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
MuleSoft Nashik Virtual Meetup#4 - Implementing CI/CD pipeline for deploying ...
 
Mule soft meetup_charlotte_4__draft_v2.0
Mule soft meetup_charlotte_4__draft_v2.0Mule soft meetup_charlotte_4__draft_v2.0
Mule soft meetup_charlotte_4__draft_v2.0
 
MuleSoft Manchester Meetup #2 slides 29th October 2019
MuleSoft Manchester Meetup #2 slides 29th October 2019MuleSoft Manchester Meetup #2 slides 29th October 2019
MuleSoft Manchester Meetup #2 slides 29th October 2019
 
MuleSoft Meetup Virtual_ 2_Charlotte
MuleSoft Meetup Virtual_ 2_CharlotteMuleSoft Meetup Virtual_ 2_Charlotte
MuleSoft Meetup Virtual_ 2_Charlotte
 
Meetup_Bangalore_Rajesh
Meetup_Bangalore_RajeshMeetup_Bangalore_Rajesh
Meetup_Bangalore_Rajesh
 
Rtf v2 ingress muleSoft meetup self managed kubernetes
Rtf v2 ingress muleSoft meetup self managed kubernetesRtf v2 ingress muleSoft meetup self managed kubernetes
Rtf v2 ingress muleSoft meetup self managed kubernetes
 
LA November Meetup (Setting up VM/Bare Metal Runtime Fabric)
LA November Meetup (Setting up VM/Bare Metal Runtime Fabric)LA November Meetup (Setting up VM/Bare Metal Runtime Fabric)
LA November Meetup (Setting up VM/Bare Metal Runtime Fabric)
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_final
 
NYC MuleSoft Meetup 2019 Q2- MuleSoft for Mobile Applications
NYC MuleSoft Meetup 2019 Q2- MuleSoft for Mobile ApplicationsNYC MuleSoft Meetup 2019 Q2- MuleSoft for Mobile Applications
NYC MuleSoft Meetup 2019 Q2- MuleSoft for Mobile Applications
 
Agile integration workshop
Agile integration workshopAgile integration workshop
Agile integration workshop
 
Mule soft Meetup #3
 Mule soft Meetup #3 Mule soft Meetup #3
Mule soft Meetup #3
 
Exposing Web Service (CXF) With Mule ESB
Exposing Web Service (CXF) With Mule ESBExposing Web Service (CXF) With Mule ESB
Exposing Web Service (CXF) With Mule ESB
 
Introduction to Mulesoft
Introduction to MulesoftIntroduction to Mulesoft
Introduction to Mulesoft
 
Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021
 
Resilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIsResilient and Adaptable Systems with Cloud Native APIs
Resilient and Adaptable Systems with Cloud Native APIs
 
Automate mule deployments with github actions and travis ci
Automate mule deployments with github actions  and  travis ciAutomate mule deployments with github actions  and  travis ci
Automate mule deployments with github actions and travis ci
 
VMware Tanzu Application Service as an Integration Platform
VMware Tanzu Application Service as an Integration PlatformVMware Tanzu Application Service as an Integration Platform
VMware Tanzu Application Service as an Integration Platform
 
Warsaw MuleSoft Meetup #6 - CI/CD
Warsaw MuleSoft Meetup  #6 - CI/CDWarsaw MuleSoft Meetup  #6 - CI/CD
Warsaw MuleSoft Meetup #6 - CI/CD
 
Deep Dive into Salesforce APIs
Deep Dive into Salesforce APIsDeep Dive into Salesforce APIs
Deep Dive into Salesforce APIs
 

Similar to MuleSoft London Community February 2020 - MuleSoft and OData

Practical OData
Practical ODataPractical OData
Practical OData
Vagif Abilov
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
Pat Patterson
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
Mindfire Solutions
 
Wcf data services
Wcf data servicesWcf data services
Wcf data services
Eyal Vardi
 
Building RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPIBuilding RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPI
Gert Drapers
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
Igor Moochnick
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developers
Glen Gordon
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
Sanchit Dua
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePoint
Sanjay Patel
 
B_110500002
B_110500002B_110500002
B_110500002
Vaibhav Chavan
 
SAP FIORI COEP Pune - pavan golesar (ppt)
SAP FIORI COEP Pune - pavan golesar (ppt)SAP FIORI COEP Pune - pavan golesar (ppt)
SAP FIORI COEP Pune - pavan golesar (ppt)
Pavan Golesar
 
Introduction to o data
Introduction to o dataIntroduction to o data
Introduction to o data
Venkatesh Narayanan
 
Web Technologies - forms and actions
Web Technologies -  forms and actionsWeb Technologies -  forms and actions
Web Technologies - forms and actions
Aren Zomorodian
 
SharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewSharePoint 2010 Application Development Overview
SharePoint 2010 Application Development Overview
Rob Windsor
 
Create Home Directories on Storage Using WFA and ServiceNow integration
Create Home Directories on Storage Using WFA and ServiceNow integrationCreate Home Directories on Storage Using WFA and ServiceNow integration
Create Home Directories on Storage Using WFA and ServiceNow integration
Rutul Shah
 
Windows Azure and a little SQL Data Services
Windows Azure and a little SQL Data ServicesWindows Azure and a little SQL Data Services
Windows Azure and a little SQL Data Services
ukdpe
 
Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014
Stephan Klevenz
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
Sanchit Dua
 
Olap
OlapOlap
Olap
preksha33
 
ADO.NET Data Services
ADO.NET Data ServicesADO.NET Data Services
ADO.NET Data Services
ukdpe
 

Similar to MuleSoft London Community February 2020 - MuleSoft and OData (20)

Practical OData
Practical ODataPractical OData
Practical OData
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
 
Wcf data services
Wcf data servicesWcf data services
Wcf data services
 
Building RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPIBuilding RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPI
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developers
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePoint
 
B_110500002
B_110500002B_110500002
B_110500002
 
SAP FIORI COEP Pune - pavan golesar (ppt)
SAP FIORI COEP Pune - pavan golesar (ppt)SAP FIORI COEP Pune - pavan golesar (ppt)
SAP FIORI COEP Pune - pavan golesar (ppt)
 
Introduction to o data
Introduction to o dataIntroduction to o data
Introduction to o data
 
Web Technologies - forms and actions
Web Technologies -  forms and actionsWeb Technologies -  forms and actions
Web Technologies - forms and actions
 
SharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewSharePoint 2010 Application Development Overview
SharePoint 2010 Application Development Overview
 
Create Home Directories on Storage Using WFA and ServiceNow integration
Create Home Directories on Storage Using WFA and ServiceNow integrationCreate Home Directories on Storage Using WFA and ServiceNow integration
Create Home Directories on Storage Using WFA and ServiceNow integration
 
Windows Azure and a little SQL Data Services
Windows Azure and a little SQL Data ServicesWindows Azure and a little SQL Data Services
Windows Azure and a little SQL Data Services
 
Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
Olap
OlapOlap
Olap
 
ADO.NET Data Services
ADO.NET Data ServicesADO.NET Data Services
ADO.NET Data Services
 

More from Pace Integration

MuleSoft London Community July 2022 - Test Driven Development
MuleSoft London Community July 2022 - Test Driven DevelopmentMuleSoft London Community July 2022 - Test Driven Development
MuleSoft London Community July 2022 - Test Driven Development
Pace Integration
 
MuleSoft London Community March 2022 - CloudHub Automation
MuleSoft London Community March 2022 - CloudHub AutomationMuleSoft London Community March 2022 - CloudHub Automation
MuleSoft London Community March 2022 - CloudHub Automation
Pace Integration
 
MuleSoft London Community September 2020 - Project Vita
MuleSoft London Community September 2020 - Project VitaMuleSoft London Community September 2020 - Project Vita
MuleSoft London Community September 2020 - Project Vita
Pace Integration
 
MuleSoft London Community November 2019 - MuleSoft and CICD
MuleSoft London Community November 2019 - MuleSoft and CICDMuleSoft London Community November 2019 - MuleSoft and CICD
MuleSoft London Community November 2019 - MuleSoft and CICD
Pace Integration
 
MuleSoft London Community October 2019 - Preparing for London Connect 2019
MuleSoft London Community October 2019 - Preparing for London Connect 2019MuleSoft London Community October 2019 - Preparing for London Connect 2019
MuleSoft London Community October 2019 - Preparing for London Connect 2019
Pace Integration
 
MuleSoft London Community August 2019 - MuleSoft with Workday
MuleSoft London Community August 2019 - MuleSoft with Workday MuleSoft London Community August 2019 - MuleSoft with Workday
MuleSoft London Community August 2019 - MuleSoft with Workday
Pace Integration
 
MuleSoft London Community March 2018 - The power of the Crowd
MuleSoft London Community March 2018 - The power of the CrowdMuleSoft London Community March 2018 - The power of the Crowd
MuleSoft London Community March 2018 - The power of the Crowd
Pace Integration
 
MuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP IntegrationMuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP Integration
Pace Integration
 
MuleSoft London Community August 2017 - API Led Connectivity
MuleSoft London Community August 2017 - API Led ConnectivityMuleSoft London Community August 2017 - API Led Connectivity
MuleSoft London Community August 2017 - API Led Connectivity
Pace Integration
 
MuleSoft London Community - May 2017 RAML
MuleSoft London Community - May 2017 RAMLMuleSoft London Community - May 2017 RAML
MuleSoft London Community - May 2017 RAML
Pace Integration
 
MuleSoft London Community - API Marketing, Culture Change and Tooling
MuleSoft London Community - API Marketing, Culture Change and ToolingMuleSoft London Community - API Marketing, Culture Change and Tooling
MuleSoft London Community - API Marketing, Culture Change and Tooling
Pace Integration
 
MuleSoft London CoP - November 2016
MuleSoft London CoP - November 2016MuleSoft London CoP - November 2016
MuleSoft London CoP - November 2016
Pace Integration
 
MuleSoft London CoP - October 2016
MuleSoft London CoP - October 2016MuleSoft London CoP - October 2016
MuleSoft London CoP - October 2016
Pace Integration
 
MuleSoft London Community September 2016
MuleSoft London Community September 2016MuleSoft London Community September 2016
MuleSoft London Community September 2016
Pace Integration
 

More from Pace Integration (14)

MuleSoft London Community July 2022 - Test Driven Development
MuleSoft London Community July 2022 - Test Driven DevelopmentMuleSoft London Community July 2022 - Test Driven Development
MuleSoft London Community July 2022 - Test Driven Development
 
MuleSoft London Community March 2022 - CloudHub Automation
MuleSoft London Community March 2022 - CloudHub AutomationMuleSoft London Community March 2022 - CloudHub Automation
MuleSoft London Community March 2022 - CloudHub Automation
 
MuleSoft London Community September 2020 - Project Vita
MuleSoft London Community September 2020 - Project VitaMuleSoft London Community September 2020 - Project Vita
MuleSoft London Community September 2020 - Project Vita
 
MuleSoft London Community November 2019 - MuleSoft and CICD
MuleSoft London Community November 2019 - MuleSoft and CICDMuleSoft London Community November 2019 - MuleSoft and CICD
MuleSoft London Community November 2019 - MuleSoft and CICD
 
MuleSoft London Community October 2019 - Preparing for London Connect 2019
MuleSoft London Community October 2019 - Preparing for London Connect 2019MuleSoft London Community October 2019 - Preparing for London Connect 2019
MuleSoft London Community October 2019 - Preparing for London Connect 2019
 
MuleSoft London Community August 2019 - MuleSoft with Workday
MuleSoft London Community August 2019 - MuleSoft with Workday MuleSoft London Community August 2019 - MuleSoft with Workday
MuleSoft London Community August 2019 - MuleSoft with Workday
 
MuleSoft London Community March 2018 - The power of the Crowd
MuleSoft London Community March 2018 - The power of the CrowdMuleSoft London Community March 2018 - The power of the Crowd
MuleSoft London Community March 2018 - The power of the Crowd
 
MuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP IntegrationMuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP Integration
 
MuleSoft London Community August 2017 - API Led Connectivity
MuleSoft London Community August 2017 - API Led ConnectivityMuleSoft London Community August 2017 - API Led Connectivity
MuleSoft London Community August 2017 - API Led Connectivity
 
MuleSoft London Community - May 2017 RAML
MuleSoft London Community - May 2017 RAMLMuleSoft London Community - May 2017 RAML
MuleSoft London Community - May 2017 RAML
 
MuleSoft London Community - API Marketing, Culture Change and Tooling
MuleSoft London Community - API Marketing, Culture Change and ToolingMuleSoft London Community - API Marketing, Culture Change and Tooling
MuleSoft London Community - API Marketing, Culture Change and Tooling
 
MuleSoft London CoP - November 2016
MuleSoft London CoP - November 2016MuleSoft London CoP - November 2016
MuleSoft London CoP - November 2016
 
MuleSoft London CoP - October 2016
MuleSoft London CoP - October 2016MuleSoft London CoP - October 2016
MuleSoft London CoP - October 2016
 
MuleSoft London Community September 2016
MuleSoft London Community September 2016MuleSoft London Community September 2016
MuleSoft London Community September 2016
 

Recently uploaded

20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

MuleSoft London Community February 2020 - MuleSoft and OData

  • 1. MULESOFT LONDON MEETUP. FEBRUARY 2020. https://www.paceintegration.com/ connect@paceintegration.com Contact Pace Integration:
  • 2. THE COMMUNITY. Signup at https://meetups.mulesoft.com/london/ Open to everyone Learn and share Interactive Build your network
  • 3. SLIDESHARE + LINKEDIN Material available afterwards on SlideShare. ENGAGE ON SOCIAL MEDIA J #MULESOFTMEETUP @PACEINTEGRATION
  • 4. ASYNC API Hybrid Integration Patterns Centre for Enablement B2B Integration API Enablement – start small, plan big GREAT TOPICS Anypoint Platform DevOps Tooling with Anypoint RAML 1.0 API Led Connectivity Anypoint Platform Crowd Release SaaS Integration Single view of Customer API Security The Connected Enterprise
  • 5. WHO WANTS TO BE A…
  • 7. ADAM MAGUIRE WILSON FAMOUS FACES. SEAN YOUNG MICHAEL JAKEMAN PIYUSH PATEL KA MAN ALEX THEEDOM Miguel Ángel Chuecos
  • 8. VIKAS SINGH Integration Program Manager Tata Consultancy Services A Seasoned Consultant with an interest in Business Agility and Enterprise Architect to bridges the gap between technology and business through automation and integration that unlocks true business value.
  • 9. PAWAN GUPTA Integration Architect Tata Consultancy Services An Integration Architect involved in the Solution design, architecture, development and implementation. Always keen to explore and learn new technology to give advantage to business.
  • 10. 10 Oh Data! Martin Gardner Solution Principal at Slalom How I learned to stop worrying and love integrating Salesforce with the Mulesoft Odata API Kit
  • 11. ABOUT ME • 16 years in CRM • 8 years in Salesforce • Data Integration and migration has been a theme throughout my career • I love data • 6 x Salesforce Certified • Mulesoft Certified Developer Level 1 Mule 4 • https://www.linkedin.com/in/martingardner/ • martin.gardner@slalom.com
  • 12. Agenda • Problem Statement & Solution Design • A very short introduction to OData • Salesforce Connect • Mulesoft OData API Kit • Translating Salesforce OData Query Parameters • Putting it all together • Summary
  • 13. Problem Statement As a Salesforce user I want to view the bank account transactions for the accounts I own from within the Salesforce user interface so that I don’t have to login to the back-office banking system. As a System owner I want to store all accounts’ transactions outside Salesforce so that I avoid exceeding my Salesforce storage limits.
  • 17. OData
  • 18. OData (Open Data Protocol) • Defines best practices for building and consuming RESTful APIs • Response Headers • Status Codes • HTTP methods • URL conventions • Media types • Payload formats • Query options • Tracking changes • Defining functions/actions for reusable procedures, and sending asynchronous/batch requests • https://odata.org • Usually used to expose databases as RESTful services.
  • 19. OData key features • Feeds : Collections of typed Entries • Entry: Represents a structured record with a key that has a list of Properties • Properties: Primitive or complex types • Links: Connect entries into a hierarchy of related entries and feeds. • Service Operations: Simple service-specific functions • Service Metadata Document • Describes the data source metadata • Allows clients to discover the top-level feeds • Available at the service root URI as Atom or JSON
  • 20. OData Operations • Retrieving the Service Document • GET https://services.odata.org/OData/OData.svc/$metadata • Retrieving feeds • Request • GET /OData/OData.svc/Products HTTP/1.1 Host: services.odata.org accept: application/atom+xml,application/xml DataServiceVersion: 1.0 MaxDataServiceVersion: 2.0 • Response • HTTP/1.1 200 OK Content-Length: 5685 Date: Sat, 27 Feb 2010 20:03:28 GMT Content-Type: application/atom+xml;charset=utf-8 DataServiceVersion: 1.0; <?xml version="1.0" encoding="utf-8" standalone="yes"?> <feed xml:base="https://services.odata.org/OData/OData.svc xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom"> <title type="text">Products</title> <id>https://services.odata.org/OData/OData.svc/Products</id> <updated>2010-02- 27T20:03:28Z</updated> <Link rel="self" title="Products" href="Products" /> <Entry> ... </Entry> <Entry> ... </Entry> <Entry> ... </Entry> </feed>
  • 22. Salesforce Lightning Connect • A framework for viewing, searching and modifying data that is stored outside a Salesforce org. • No need for ETL • Data does not sit in Salesforce and consume data storage on platform • Use when • You have large volumes of data that you don’t want to copy to Salesforce • You need small amounts of data at any one time • You need real-time access to the latest data • You want to display the data in your Salesforce org. • Salesforce Lightning Connect has connectors for OData 2.0 and OData 4.0 • Trailhead Module • https://trailhead.salesforce.com/en/content/learn/modules/lightning_connect/lightn ing_connect_introduction
  • 23. Mulesoft OData API Kit Extension Builds services from the entity data model (EDM) written in RAML Supports OData 2.0 (not 4.0) Prerequisites • OData Plugin • Mule EE 4.1.1 and later • Anypoint Studio 7.1.4 and later • Maven https://docs.mulesoft.com/apikit/4.x /creating-an-odata-api-with-apikit
  • 24. Mulesoft API Kit Extension • Define the API in RAML first. • Use the Alt Menu -> Mule -> Generate Flows from REST API to generate the flow skeleton. • Must set the version on the HTTP Listener rather than in the configuration otherwise the API Kit extension doesn’t initialize properly. <http:listener config-ref=”http-listener-config” path=“/v1/*”>
  • 25. Translating OData Query parameters We must transform the query parameters to make them work for the underlying service. The example from Mulesoft works for a MySQL database. The following examples are for a SOAP web service. To keep our app agnostic of the fields in the SOAP service we use XQuery to transform the payload using our select, filter, orderby, top, skip, and limit variables.
  • 26. OData Query Parameters OData uses query parameters to provide operations to our app. These are the operations we need for a read-only service. • select : Defines which columns or fields in the entity to return. • filter : Defines the ‘WHERE’ clause for the query to restrict the records returned based on criteria. • orderby : Defines the sort order of the result set. • top : Defines the number of records to return in the first page i.e. TOP 10 returns the first 10 records based on the orderby. • skip : Defines how many of the records at the top of the result set to ignore. This is used by the client to page through the result set. • limit : Defines the maximum number of records to return across all pages.
  • 27.
  • 28. Translating Query Parameters : Select Contains a comma separated list of fields to return. A * in the select parameter indicates that all fields should be returned. For our app to work we turn the * into a list of specific fields so we call the service and use this dataweave to set a variable called select. %dw 2.0 output text/plain import * from dw::core::Objects var data = if (payload != null) payload[0] else [] var names = if (typeOf(data) as String == “Object” nameSet(data) else [] var select : String = vars.select match { case select if (select is String and select != ”” and select !=”*”) -> select as String case “*” -> joinBy(names, ”, “) as String else -> joinBy(names, “, ”) as String } default joinBy(names, ”, “) as String --- select
  • 29. Translating Query Parameters : Filtering Salesforce has a few curious ways of implementing these filters. For example instead of contains it uses indexof to find a given string in a field We translate the filter operators from words into operator characters, i.e. eq -> = We translate datetimeoffset to xs:date format var odataFilterToXQFilter = (odatafilter) -> (( odatafilter replace ”eq null” with “= ‘’” replace /(?i)indexof((’*?|”*?)(w*?)(’*?|”*?),((’*?|”*?)(w*?)(’*?|”*?)))((s*?)ne(/s*?)-1)/ with (“fn:contains(“ ++ $[2] ++ “,” ++ $[4] ++ “)”) replace “ne null” with “!= ‘’” replace “ eq “ with “ = “ replace “ ne “ with “ != “ //Further replacements of operators omitted replace /(?i)(datetimeoffset’)(d{4,4}-d{1,2}-d{1,2})Td{1,2}:d{1,2}:d{1,2}(Z)(‘)/ with |( “xs:date(‘” ++ $[2] ++ $[3] ++ ”’)”) ) splitBy ” “ map (item, idx) -> ( if(names contains item ) “$tran/” ++ item else item ) ) joinBy “ “
  • 30. Translating Query Parameters : Ordering The default ordering for both Salesforce and OData is ascending. The orderby parameter contains a comma separated list of fields with or without sort order indicators i.e. name asc, date descending Each ordering has two possible tokens asc, ascending and desc, descending var odataOrderToXOrder = (odataOrderBy) -> ( ( odataOrderBy replace “, ” with “ , “ replace “asc” with “ascending” replace “desc” with “descending” ) splitBy(/s/) map (item, idx) -> ( if ( names contains item ) “$tran/” ++ item else item ) ) joinBy “ “
  • 31. Translating Query Parameters : XQuery The results of the previous steps are now used to construct an XQuery FLWOR expression to transform our payload. odataFilterToXQFilter is used to transform the OData filter into a form usable by XQuery. odataOrdertoXQOrder is used to transform the OData orderby parameter into a form usable by XQuery. The resulting string is stored in a variable and passed to an XML XQuery transform step. --- ‘xquery version “3.0”; declare variable $document external; <transactions> { for $tran in $document/transactions/transaction where ‘ ++ odataFilterToXQFilter(vars.filter) ++ ‘ order by ‘ ++ odataOrderToXQOrder(vars.orderby) ++ ‘ return $tran } </transactions>’
  • 32.
  • 33. Translating Query Parameters : Selecting and Paging The previous steps have given us a payload that contains the correct full set of records for the given query parameters. The final step is to apply the paging parameters to return the correct subset of records and fields to the client. For this we use the following dataweave on our payload. %dw 2.0 output application/json var transactionCount : Number = sizeOf(payload default []) var rangeStart : Number = if(vars.skip > transactionCount) transactionCount else vars.skip var lastIndex : Number = vars.skip + (vars.top -1) var rangeEnd : Number = if(lastIndex >= transactionCount) transactionCount -1 else lastIndex --- { “entries” : if(not isEmpty(payload)) ( payload[rangeStart to rangeEnd] map ( //This filters the record set $ filterObject (( value, key) -> vars.select contains(key))) // This selects the fields to be returned ) else [] }
  • 35. Putting it all together • Mulesoft • Import the example project • Create a new app using the OData API Kit extensions • Look out for the version: it must be specified on the HTTP Connector directly • Implement flows for each entity and operation • Translate OData query parameters to apply to SOAP XML documents • Deploy to Anypoint Cloud Hub so it is visible to Salesforce • Salesforce External Service • Use the Service Document to create the external object • Use AtomPub not JSON as Salesforce doesn’t seem to work with JSON • Use the OData test kit to check the connection and queries • Add an indirect lookup to link the data to a parent record in Salesforce • Add the related list to the page layout
  • 36.
  • 37. Summary Data visible in Salesforce Data stored externally Data presented in real-time
  • 38. Salesforce External Object Mulesoft Banking Platform HTTPS OData Request HTTPS OData Response SOAP Request SOAP Response Transaction List User Dataweave and XQuery magic in here
  • 40. Resources • Mulesoft • Mulesoft OData API Kit documentation : https://docs.mulesoft.com/apikit/4.x/creating-an-odata-api- with-apikit • OData API Kit example project • https://docs.mulesoft.com/apikit/4.x/_attachments/apikit-odata-example-master.zip • Salesforce External Service • Trailhead Module : https://trailhead.salesforce.com/content/learn/modules/lightning_connect • Trailhead Project : https://trailhead.salesforce.com/en/content/learn/projects/quickstart-lightning- connect • External Objects Documentation : https://developer.salesforce.com/docs/atlas.en- us.object_reference.meta/object_reference/sforce_api_objects_external_objects.htm • OData • Documentation: https://www.odata.org/documentation/ • Reference Services: https://www.odata.org/odata-services/ • XQuery • XQuery 3.0 documentation : https://www.w3.org/TR/2014/REC-xquery-30-20140408/ • FLWOR : For, let, where, order by, return https://en.wikipedia.org/wiki/FLWOR