SlideShare a Scribd company logo
Deep Dive into Salesforce
APIs
New York MuleSoft Meetup Group
September 11, 2021
2
▪ Around 14 years of Experience into ERP and Integrations.
▪ Working as Development and Integration Architect @Casper Inc.
▪ 3X MuleSoft Certified, 1X AWS Certified
▪ Managed multiple End to End Implementations/Integration projects.
▪ Mentoring Mule Developers and People trying to switch to MuleSoft.
Introduction
Neeraj Kumar- Host NYC
Safe Harbor Statement
•Both the speaker and host are organizing this meet up in individual capacity only.
We are not representing our companies here.
•This presentation is strictly for learning purpose only. Organizer/Presenter do not
hold any responsibility that same solution will work for your business
requirements also.
•This presentation is not meant for any promotional activities.
4
Sarah Khalid
●Over 12 years of Salesforce experience
●Over 1 year of MuleSoft experience
●15 x Salesforce Certified and MuleSoft Certified Developer
●Salesforce Technical Architect
●MuleSoft Mentor
●Salesforce WIT User Group Leader
●Salesforce Golden Hoodie Holder
●Blogs about Salesforce and MuleSoft
Introductions
5
● Intro to Salesforce and the type of API’s supported by Salesforce
● What are the different types of Salesforce API’s
○ Salesforce REST API
○ Salesforce SOAP API
○ Salesforce Bulk API
○ Salesforce Metadata API
○ Salesforce REST API Composite Resources
● How to interact with Salesforce from MuleSoft using the Salesforce Connectors with demo project in Anypoint Studio
○ Salesforce SOAP API
○ Salesforce Bulk API
○ Salesforce Metadata API
○ Salesforce REST API Composite Resources
○ Salesforce Streaming API
● Wrap up - Q&A
Agenda
Salesforce API’s
7
● API’s are a way for other applications to programmatically interact with Salesforce
● Over the course of the years Salesforce has evolved as a platform and a result they
have a lot of different API’s - each for a specific use. Some of the API’s are:
○ REST API
○ SOAP API
○ Metadata API
○ Chatter API
○ Bulk API
○ Streaming API
● Salesforce is a cloud based multi-tenant environment and due to this there are
certain governor limits imposed on each Salesforce org. There are specific limits
around API’s. Details around those limits are available here.
● For detailed information on all the different Salesforce API’s, please visit the
Salesforce Developer Documentation here.
Overview of Salesforce API’s
8
● REST API provides a powerful, convenient, and simple Web services API for
interacting with Lightning Platform.
● If you have many records to process, consider using Bulk API, which is based on
REST principles and optimized for large sets of data.
● REST API uses the same underlying data model and standard objects as those in
SOAP API
● Each resource in REST API is identified by a named Uniform Resource Identifier
(URI) and is accessed using standard HTTP methods (HEAD, GET, POST, PATCH,
DELETE)
● We can use the Salesforce Developer workbench to interact with the REST API
○ For example we want to retrieve data for a specific record
/services/data/v50.0/sobjects/Account/0014x00000DywlDAAR
● If you are interested in looking at these API’s you can use a tool like Postman
● There is another great tool used called Workbench that let’s you interact with some of
these API’s as well.
Salesforce REST API
9
● Use SOAP API to create, retrieve, update or delete records, such as accounts, leads, and
custom objects.
● SOAP API supports more than 20 different calls
● Since SOAP is XML based – the SOAP API is using XML at the back
● A lot of processors in the MuleSoft Salesforce Connector are using the SOAP API behind the
scenes
Salesforce SOAP API
10
● We will use the Query Processor to pull data out from one org and then use the Create
Processor to insert data into another org
● The Salesforce SOAP API is available with the Salesforce Connector for MuleSoft
Salesforce SOAP API Example
11
● Bulk API is based on REST principles and is optimized for loading or deleting large
sets of data.
● You can use it to query, queryAll, insert, update, upsert, or delete many records
asynchronously by submitting batches.
● Salesforce processes batches in the background
○ Maximum number of records in 24 hours - 150,000,000
○ Maximum number of records in a batch – 10,000
● You process a set of records by creating a job that contains one or more batches.
The job specifies which object is being processed and what type of operation is being
used. A batch is a set of records sent to the server in an HTTP POST request. Each
batch is processed independently by the server, not necessarily in the order it is
received. Batches may be processed in parallel. It's up to the client to decide how to
divide the entire data set into a suitable number of batches.
Salesforce Bulk API
12
● In this example, we will read data from a csv file and then use the bulk api processor to bulk
insert the files from the csv file into Salesforce. We can then view the job and it’s status in
Salesforce under Bulk Data Load Jobs
● The Salesforce Bulk API is available under the Salesforce Connector for MuleSoft
Salesforce Bulk API Example
13
● Use Metadata API to retrieve, deploy, create, update or delete customization
information, such as custom object definitions and page layouts, for your
organization.
● This API is intended for managing customizations and for building tools that can
manage the metadata model, not the data itself.
● You can use the Metadata API to manage setup and customization information
(metadata) for your organizations. For example:
○ Export the customizations in your organization as XML metadata files
○ Migrate configuration changes between organizations.
○ Modify existing customizations in your organization using XML metadata files.
○ Manage customizations in your organization programmatically.
● You can deploy or retrieve up to 10,000 files at once.
Salesforce Metadata API
14
● In this example, we will use the Describe metadata processor to retrieve all metadata from a
Salesforce org.
● Some of processors for the Salesforce Metadata API are available under the Salesforce
Connector for MuleSoft
Salesforce Metadata API Example
15
● Part of the REST API but let’s you composite resources to improve your
application’s performance by minimizing the number of round-trips between
the client and server
● Available in MuleSoft using the Salesforce Composite module from Exchange
● Executes a series of REST API requests in a single call. You can use the
output of one request as the input to a subsequent request which enables you
to create multiple related records with a single API call
● Details about Composite resources are available at:
○ https://developer.salesforce.com/docs/atlas.en-
us.api_rest.meta/api_rest/resources_composite.htm
Salesforce REST API Composite Resources
16
● In this example, we will get data from multiple tables in a MySQL Database Server database
and insert into Salesforce using a single API call
● If a single record in the operation fails, the entire operation fails and rolls back
● You need to create a connected app in Salesforce for doing authentication
Salesforce REST API Composite Resources
17
● Streaming API enables streaming of events using push technology and
provides a subscription mechanism for receiving events in near real time.
● The Streaming API subscription mechanism supports multiple types of events,
including PushTopic events, generic events, platform events, and Change
Data Capture events.
● Use the streaming API in MuleSoft when you want MuleSoft to consume an
event that has been published from Salesforce
● You can also publish events to Salesforce from MuleSoft by making use of the
Streaming API
● More details about the streaming are available here.
Salesforce Streaming API
18
● In this example, we will publish an event from Salesforce using Change Data Capture and
then consume this event in MuleSoft. Suppose, you have integrated systems where
Salesforce is the system of record for accounts and you need to update the account related
information to the other systems in real-time once it’s updated in Salesforce. You can publish
the changes and then MuleSoft can subscribe to these changes and then propagate to the
other systems as needed.
● This can be accomplished by using Replay Channel Listener processor from the MuleSoft
Salesforce Streaming API
19
● Salesforce API’s for Postman
○ https://github.com/forcedotcom/postman-salesforce-apis
● Salesforce Developer Documentation – API’s
○ https://developer.salesforce.com/docs/?filter_text=api&service=All%20Services&select_type=&versi
on=51.0&lang=en-us&sort=title
● Workbench
○ https://workbench.developerforce.com/
● Sarah’s Blog focused on content that shows Salesforce/MuleSoft integrations
○ https://sarahinthecloud.wordpress.com/
● Trailhead
○ https://trailhead.salesforce.com/
Useful Resources
Q & A
Quiz Time
Get ready to WIN a Special Gift from MuleSoft Community
Upcoming Meetups
● Topic: Unleashing DynamoDB Integration with Mule 4
Date: Saturday, Oct 16th 2021 , 11AM EDT
Speaker: Sanjay Gopal, India
https://meetups.mulesoft.com/events/details/mulesoft-new-york-city-presents-unleashing-dynamodb-integration-with-mule-4/
Thank you

More Related Content

What's hot (20)

PDF
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
Jitendra Bafna
 
PPTX
Mumbai MuleSoft Meetup #18
Akshata Sawant
 
PPTX
Mule soft meetup__official__feb-27_2021
sumitahuja94
 
PDF
MuleSoft Surat Virtual Meetup#19 - Identity and Client Management With MuleSoft
Jitendra Bafna
 
PDF
MuleSoft Surat Live Demonstration Virtual Meetup#3 - Building JWT OAuth 2.0 C...
Jitendra Bafna
 
PDF
MuleSoft Surat Live Demonstration Virtual Meetup#4 - Automate Anypoint VPC, V...
Jitendra Bafna
 
PDF
MuleSoft Surat Virtual Meetup#3 - Anypoint Custom Policies, API Manager (Prox...
Jitendra Bafna
 
PPTX
Hyderabad meet up-sep12
Sravan Lingam
 
PDF
MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...
Jitendra Bafna
 
PPTX
Meetup_Bangalore_Rajesh
D.Rajesh Kumar
 
PDF
Mule soft mcia-level-1 Dumps
Armstrongsmith
 
PDF
MuleSoft Nashik Virtual Meetup#2 - API Led Connectivity Integration:SAGA
Jitendra Bafna
 
PDF
Custom policies in mule 4 and a circuit breaker example
Royston Lobo
 
PDF
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
Jitendra Bafna
 
PPTX
Meet up slides_mumbai_05022020_final
Akshata Sawant
 
PPTX
Nyc mule soft_meetup_13_march_2021
NeerajKumar1965
 
PDF
MuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.io
Jitendra Bafna
 
PPTX
Anypoint Monitoring - Built in Dashboards, Custom Dashboards, Alerts and Func...
Anoop Ramachandran
 
PDF
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
Jitendra Bafna
 
PDF
MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...
Jitendra Bafna
 
MuleSoft Surat Virtual Meetup#6 - MuleSoft Project Template Using Maven Arche...
Jitendra Bafna
 
Mumbai MuleSoft Meetup #18
Akshata Sawant
 
Mule soft meetup__official__feb-27_2021
sumitahuja94
 
MuleSoft Surat Virtual Meetup#19 - Identity and Client Management With MuleSoft
Jitendra Bafna
 
MuleSoft Surat Live Demonstration Virtual Meetup#3 - Building JWT OAuth 2.0 C...
Jitendra Bafna
 
MuleSoft Surat Live Demonstration Virtual Meetup#4 - Automate Anypoint VPC, V...
Jitendra Bafna
 
MuleSoft Surat Virtual Meetup#3 - Anypoint Custom Policies, API Manager (Prox...
Jitendra Bafna
 
Hyderabad meet up-sep12
Sravan Lingam
 
MuleSoft Surat Virtual Meetup#15 - Caching Scope, Caching Strategy and Jenkin...
Jitendra Bafna
 
Meetup_Bangalore_Rajesh
D.Rajesh Kumar
 
Mule soft mcia-level-1 Dumps
Armstrongsmith
 
MuleSoft Nashik Virtual Meetup#2 - API Led Connectivity Integration:SAGA
Jitendra Bafna
 
Custom policies in mule 4 and a circuit breaker example
Royston Lobo
 
MuleSoft Surat Live Demonstration Virtual Meetup#1 - Anypoint VPC VPN and DLB
Jitendra Bafna
 
Meet up slides_mumbai_05022020_final
Akshata Sawant
 
Nyc mule soft_meetup_13_march_2021
NeerajKumar1965
 
MuleSoft Surat Virtual Meetup#4 - Anypoint Monitoring and MuleSoft dataloader.io
Jitendra Bafna
 
Anypoint Monitoring - Built in Dashboards, Custom Dashboards, Alerts and Func...
Anoop Ramachandran
 
MuleSoft Surat Virtual Meetup#6 - MuleSoft API Led Connectivity, SEDA and MUn...
Jitendra Bafna
 
MuleSoft Surat Virtual Meetup#7 - JSON Logger and Common Error Handling With ...
Jitendra Bafna
 

Similar to Deep Dive into Salesforce APIs (20)

PPTX
#ImpactSalesforceSaturday:360 degree view of salesforce integrations
New Delhi Salesforce Developer Group
 
PPTX
Salesforce integration best practices columbus meetup
MuleSoft Meetup
 
PDF
MuleSoft Surat Virtual Meetup#24 - MuleSoft and Salesforce Integration and De...
Jitendra Bafna
 
PPT
Mule net suite connectors
himajareddys
 
PPT
Mule NetSuite connectors
D.Rajesh Kumar
 
PDF
Blazing new trails with salesforce data nov 16, 2021
Safe Software
 
PPTX
Meet up slides_mumbai_21032020_final
Akshata Sawant
 
PPTX
Salesforce Developer User Group, Oslo, Norway - Salesforce PubSub API and gRP...
Kenneth Sørensen
 
PDF
Hia 1691-using iib-to_support_api_economy
Andrew Coleman
 
PDF
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
Dreamforce
 
PDF
MuleSoft Madrid Meetup #3 slides 2nd July 2020
Ieva Navickaite
 
PDF
Scalable Deployment Patterns in WSO2 API Manager
WSO2
 
PPTX
Discover Salesforce Commerce Cloud and Vlocity Integration Patterns
Eva Mave Ng
 
PPTX
MuleSoft London Community October 2017 - Hybrid and SAP Integration
Pace Integration
 
PDF
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PROIDEA
 
PPTX
SAP and Salesforce Integration
Glenn Johnson
 
PPT
Mule salesforce integration solutions
charan teja R
 
PPT
Mule salesforce integration solutions
vishnukanthro45
 
PPT
Mule salesforce integration solutions
himajareddys
 
PPTX
Power of LWC + Mulesoft
NeerajKumar1965
 
#ImpactSalesforceSaturday:360 degree view of salesforce integrations
New Delhi Salesforce Developer Group
 
Salesforce integration best practices columbus meetup
MuleSoft Meetup
 
MuleSoft Surat Virtual Meetup#24 - MuleSoft and Salesforce Integration and De...
Jitendra Bafna
 
Mule net suite connectors
himajareddys
 
Mule NetSuite connectors
D.Rajesh Kumar
 
Blazing new trails with salesforce data nov 16, 2021
Safe Software
 
Meet up slides_mumbai_21032020_final
Akshata Sawant
 
Salesforce Developer User Group, Oslo, Norway - Salesforce PubSub API and gRP...
Kenneth Sørensen
 
Hia 1691-using iib-to_support_api_economy
Andrew Coleman
 
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
Dreamforce
 
MuleSoft Madrid Meetup #3 slides 2nd July 2020
Ieva Navickaite
 
Scalable Deployment Patterns in WSO2 API Manager
WSO2
 
Discover Salesforce Commerce Cloud and Vlocity Integration Patterns
Eva Mave Ng
 
MuleSoft London Community October 2017 - Hybrid and SAP Integration
Pace Integration
 
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PROIDEA
 
SAP and Salesforce Integration
Glenn Johnson
 
Mule salesforce integration solutions
charan teja R
 
Mule salesforce integration solutions
vishnukanthro45
 
Mule salesforce integration solutions
himajareddys
 
Power of LWC + Mulesoft
NeerajKumar1965
 
Ad

More from NeerajKumar1965 (16)

PPTX
Advanced Integrations of MuleSoft with ChatGTP
NeerajKumar1965
 
PPTX
Liquibase Integration with MuleSoft
NeerajKumar1965
 
PPTX
Introduction to CloudHub 2.0
NeerajKumar1965
 
PPTX
Shopify Mulesoft Integrations
NeerajKumar1965
 
PPTX
Connect_Recap.pptx
NeerajKumar1965
 
PPTX
Batch Message Listener capabilities of the Apache Kafka Connector
NeerajKumar1965
 
PPTX
Deep Dive into Event Driven Architecture(Async API)
NeerajKumar1965
 
PPTX
Anypoint Data Graphs
NeerajKumar1965
 
PPTX
Accelerate integration with SAP using MuleSoft
NeerajKumar1965
 
PPTX
Automate mule deployments with github actions and travis ci
NeerajKumar1965
 
PDF
Trailhead - The bridge between Salesforce and MuleSoft
NeerajKumar1965
 
PPTX
Caching strategies in MuleSoft
NeerajKumar1965
 
PDF
Deep Dive on CI/CD NYC Meet Up Group
NeerajKumar1965
 
PPTX
Integrating with Aws s3
NeerajKumar1965
 
PPTX
Anypoint MQ-DLQ NYC Meet Up
NeerajKumar1965
 
PPTX
Batch Processing with Mule 4
NeerajKumar1965
 
Advanced Integrations of MuleSoft with ChatGTP
NeerajKumar1965
 
Liquibase Integration with MuleSoft
NeerajKumar1965
 
Introduction to CloudHub 2.0
NeerajKumar1965
 
Shopify Mulesoft Integrations
NeerajKumar1965
 
Connect_Recap.pptx
NeerajKumar1965
 
Batch Message Listener capabilities of the Apache Kafka Connector
NeerajKumar1965
 
Deep Dive into Event Driven Architecture(Async API)
NeerajKumar1965
 
Anypoint Data Graphs
NeerajKumar1965
 
Accelerate integration with SAP using MuleSoft
NeerajKumar1965
 
Automate mule deployments with github actions and travis ci
NeerajKumar1965
 
Trailhead - The bridge between Salesforce and MuleSoft
NeerajKumar1965
 
Caching strategies in MuleSoft
NeerajKumar1965
 
Deep Dive on CI/CD NYC Meet Up Group
NeerajKumar1965
 
Integrating with Aws s3
NeerajKumar1965
 
Anypoint MQ-DLQ NYC Meet Up
NeerajKumar1965
 
Batch Processing with Mule 4
NeerajKumar1965
 
Ad

Recently uploaded (20)

PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
July Patch Tuesday
Ivanti
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
July Patch Tuesday
Ivanti
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Biography of Daniel Podor.pdf
Daniel Podor
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 

Deep Dive into Salesforce APIs

  • 1. Deep Dive into Salesforce APIs New York MuleSoft Meetup Group September 11, 2021
  • 2. 2 ▪ Around 14 years of Experience into ERP and Integrations. ▪ Working as Development and Integration Architect @Casper Inc. ▪ 3X MuleSoft Certified, 1X AWS Certified ▪ Managed multiple End to End Implementations/Integration projects. ▪ Mentoring Mule Developers and People trying to switch to MuleSoft. Introduction Neeraj Kumar- Host NYC
  • 3. Safe Harbor Statement •Both the speaker and host are organizing this meet up in individual capacity only. We are not representing our companies here. •This presentation is strictly for learning purpose only. Organizer/Presenter do not hold any responsibility that same solution will work for your business requirements also. •This presentation is not meant for any promotional activities.
  • 4. 4 Sarah Khalid ●Over 12 years of Salesforce experience ●Over 1 year of MuleSoft experience ●15 x Salesforce Certified and MuleSoft Certified Developer ●Salesforce Technical Architect ●MuleSoft Mentor ●Salesforce WIT User Group Leader ●Salesforce Golden Hoodie Holder ●Blogs about Salesforce and MuleSoft Introductions
  • 5. 5 ● Intro to Salesforce and the type of API’s supported by Salesforce ● What are the different types of Salesforce API’s ○ Salesforce REST API ○ Salesforce SOAP API ○ Salesforce Bulk API ○ Salesforce Metadata API ○ Salesforce REST API Composite Resources ● How to interact with Salesforce from MuleSoft using the Salesforce Connectors with demo project in Anypoint Studio ○ Salesforce SOAP API ○ Salesforce Bulk API ○ Salesforce Metadata API ○ Salesforce REST API Composite Resources ○ Salesforce Streaming API ● Wrap up - Q&A Agenda
  • 7. 7 ● API’s are a way for other applications to programmatically interact with Salesforce ● Over the course of the years Salesforce has evolved as a platform and a result they have a lot of different API’s - each for a specific use. Some of the API’s are: ○ REST API ○ SOAP API ○ Metadata API ○ Chatter API ○ Bulk API ○ Streaming API ● Salesforce is a cloud based multi-tenant environment and due to this there are certain governor limits imposed on each Salesforce org. There are specific limits around API’s. Details around those limits are available here. ● For detailed information on all the different Salesforce API’s, please visit the Salesforce Developer Documentation here. Overview of Salesforce API’s
  • 8. 8 ● REST API provides a powerful, convenient, and simple Web services API for interacting with Lightning Platform. ● If you have many records to process, consider using Bulk API, which is based on REST principles and optimized for large sets of data. ● REST API uses the same underlying data model and standard objects as those in SOAP API ● Each resource in REST API is identified by a named Uniform Resource Identifier (URI) and is accessed using standard HTTP methods (HEAD, GET, POST, PATCH, DELETE) ● We can use the Salesforce Developer workbench to interact with the REST API ○ For example we want to retrieve data for a specific record /services/data/v50.0/sobjects/Account/0014x00000DywlDAAR ● If you are interested in looking at these API’s you can use a tool like Postman ● There is another great tool used called Workbench that let’s you interact with some of these API’s as well. Salesforce REST API
  • 9. 9 ● Use SOAP API to create, retrieve, update or delete records, such as accounts, leads, and custom objects. ● SOAP API supports more than 20 different calls ● Since SOAP is XML based – the SOAP API is using XML at the back ● A lot of processors in the MuleSoft Salesforce Connector are using the SOAP API behind the scenes Salesforce SOAP API
  • 10. 10 ● We will use the Query Processor to pull data out from one org and then use the Create Processor to insert data into another org ● The Salesforce SOAP API is available with the Salesforce Connector for MuleSoft Salesforce SOAP API Example
  • 11. 11 ● Bulk API is based on REST principles and is optimized for loading or deleting large sets of data. ● You can use it to query, queryAll, insert, update, upsert, or delete many records asynchronously by submitting batches. ● Salesforce processes batches in the background ○ Maximum number of records in 24 hours - 150,000,000 ○ Maximum number of records in a batch – 10,000 ● You process a set of records by creating a job that contains one or more batches. The job specifies which object is being processed and what type of operation is being used. A batch is a set of records sent to the server in an HTTP POST request. Each batch is processed independently by the server, not necessarily in the order it is received. Batches may be processed in parallel. It's up to the client to decide how to divide the entire data set into a suitable number of batches. Salesforce Bulk API
  • 12. 12 ● In this example, we will read data from a csv file and then use the bulk api processor to bulk insert the files from the csv file into Salesforce. We can then view the job and it’s status in Salesforce under Bulk Data Load Jobs ● The Salesforce Bulk API is available under the Salesforce Connector for MuleSoft Salesforce Bulk API Example
  • 13. 13 ● Use Metadata API to retrieve, deploy, create, update or delete customization information, such as custom object definitions and page layouts, for your organization. ● This API is intended for managing customizations and for building tools that can manage the metadata model, not the data itself. ● You can use the Metadata API to manage setup and customization information (metadata) for your organizations. For example: ○ Export the customizations in your organization as XML metadata files ○ Migrate configuration changes between organizations. ○ Modify existing customizations in your organization using XML metadata files. ○ Manage customizations in your organization programmatically. ● You can deploy or retrieve up to 10,000 files at once. Salesforce Metadata API
  • 14. 14 ● In this example, we will use the Describe metadata processor to retrieve all metadata from a Salesforce org. ● Some of processors for the Salesforce Metadata API are available under the Salesforce Connector for MuleSoft Salesforce Metadata API Example
  • 15. 15 ● Part of the REST API but let’s you composite resources to improve your application’s performance by minimizing the number of round-trips between the client and server ● Available in MuleSoft using the Salesforce Composite module from Exchange ● Executes a series of REST API requests in a single call. You can use the output of one request as the input to a subsequent request which enables you to create multiple related records with a single API call ● Details about Composite resources are available at: ○ https://developer.salesforce.com/docs/atlas.en- us.api_rest.meta/api_rest/resources_composite.htm Salesforce REST API Composite Resources
  • 16. 16 ● In this example, we will get data from multiple tables in a MySQL Database Server database and insert into Salesforce using a single API call ● If a single record in the operation fails, the entire operation fails and rolls back ● You need to create a connected app in Salesforce for doing authentication Salesforce REST API Composite Resources
  • 17. 17 ● Streaming API enables streaming of events using push technology and provides a subscription mechanism for receiving events in near real time. ● The Streaming API subscription mechanism supports multiple types of events, including PushTopic events, generic events, platform events, and Change Data Capture events. ● Use the streaming API in MuleSoft when you want MuleSoft to consume an event that has been published from Salesforce ● You can also publish events to Salesforce from MuleSoft by making use of the Streaming API ● More details about the streaming are available here. Salesforce Streaming API
  • 18. 18 ● In this example, we will publish an event from Salesforce using Change Data Capture and then consume this event in MuleSoft. Suppose, you have integrated systems where Salesforce is the system of record for accounts and you need to update the account related information to the other systems in real-time once it’s updated in Salesforce. You can publish the changes and then MuleSoft can subscribe to these changes and then propagate to the other systems as needed. ● This can be accomplished by using Replay Channel Listener processor from the MuleSoft Salesforce Streaming API
  • 19. 19 ● Salesforce API’s for Postman ○ https://github.com/forcedotcom/postman-salesforce-apis ● Salesforce Developer Documentation – API’s ○ https://developer.salesforce.com/docs/?filter_text=api&service=All%20Services&select_type=&versi on=51.0&lang=en-us&sort=title ● Workbench ○ https://workbench.developerforce.com/ ● Sarah’s Blog focused on content that shows Salesforce/MuleSoft integrations ○ https://sarahinthecloud.wordpress.com/ ● Trailhead ○ https://trailhead.salesforce.com/ Useful Resources
  • 20. Q & A
  • 21. Quiz Time Get ready to WIN a Special Gift from MuleSoft Community
  • 22. Upcoming Meetups ● Topic: Unleashing DynamoDB Integration with Mule 4 Date: Saturday, Oct 16th 2021 , 11AM EDT Speaker: Sanjay Gopal, India https://meetups.mulesoft.com/events/details/mulesoft-new-york-city-presents-unleashing-dynamodb-integration-with-mule-4/