Consume Salesforce API Using REST Client Connector
Consume Salesforce API Using REST Client Connector
Consume Salesforce API Using REST Client Connector
What is Rest?
Rest stands for representational state transfer.
An API, or application programming interface, is a set of rules that define how
applications or devices can connect to and communicate with each other. A REST
API is an API that conforms to the design principles of the REST, or representational
state transfer architectural style. For this reason, REST APIs are sometimes referred
to as RESTful APIs.
Rest Principles
Rest APIs are following six REST design principles
1. Uniform interface
2. Client-server architecture
3. Statelessness
4. Cacheability
5. Layered system architecture
6. Code on demand (optional)
Use Email Address and Password to log into the Boomi platform
2. Click on Integration
Drag and drop the Rest Client Connector in the process canvas.
7. Drag and drop the Rest Client
Connector
PUT — Replace the resource at the current URL on the server with the resource contained within the
request.
HEAD — Retrieve header information about an existing resource from the server, and not the actual
resource itself.
OPTIONS — Retrieve information about the communication options available for an existing
resource from the server.
PATCH — Update and make partial changes to an existing resource without replacing the original
version of the resource.
TRACE — Perform a message loop-back test along the path to the target resource.
12. Paste the Base URL in the Connection Component Base URL box and select the
Authentication Type OAuth2.0
Read Timeout
The maximum wait in milliseconds to return all of the data from a service. A value
less than or equal to zero means that the process will wait indefinitely until all of the data
has been returned from the service.
Cookie Scope
Global — cookies are shared in all processes throughout the Atom JVM life
cycle. This is the default.
Connector Shape — cookies are isolated and shared only for the duration of
the Connector Shape execution.
Ignored — cookies are discarded, even if they are requested by the server.
Grant Type
Authorization Code — The standard, 3–Legged OAuth2 authorization where
you grant the client an authorization code that can be exchanged for an
access token.
Resource Owner Credentials — Requires username and password
Client Credentials — Uses client credentials to retrieve an access token
directly instead of asking for user authorization. This authorization is typically
used for administration tasks specific to a client.
Click this Manage Customer Details Button to generate a Client ID and Client secret.
One mail will be sent by Salesforce with the verification code to the mail ID that we give at the time of
configuring the connected app.
25. Give the Client ID, Client Secret, and Access Token URL
Access Token URL: Base URL + /services/oauth2/token
this API call, we will get a job ID, we need that ID to fetch records from
Salesforce.
o Path: services/data/v57.0/jobs/query
o We need to add a property to give a Content-Type. The values are static.
29. Use a Message shape to pass a request file to the API
We need ID,
Account Number, and Name. If we need more fields, we can mention them in the query.
30. Use a set property shape to capture the job ID from the profile element and
store it in a Dynamic Process Property
31. Set a DPP to store the job ID
32. Set the Parameter Value
33.
Use a
stop
35. Use a Data Process shape to give some delay to our process
Note: The job takes some time to complete so we use delay. If we don’t use
delay some time job will not be complete and we don’t get the desired
output.
36. Choose the Custom Scripting in Data Process Shape
43.
Configure the Operation of the Rest Client Connector and the action should
be Get also we need to reuse the Connection
44. Set the path in Dynamic Operation
Property
Thank You