Configuring Salesforce as Source
Configuring Salesforce as the Source: A Comprehensive Guide
This guide provides a comprehensive walkthrough for setting up Salesforce as the source. By following these steps, you will be able to configure Salesforce as the source smoothly and efficiently.
Data Source :
Step 1:
· In the Data Source page, Select the source type as API
Step 2:
· Now select the “Salesforce” as your product
Step 3:
· Choose the appropriate business object based on your needs.
Note: In the event the desired product or business object isn't available, you have the option to select 'Create New' in the product name field. Provide the necessary details for the new product and the business object you intend to configure as the source.
Note: Opting for 'Create New' requires the user to furnish all necessary details essential for configuring the API as the source.
Step 4:
· After selecting the business object (such as Account Information in this example), the system loads all prerequisites.
· Provide the following details in the API Endpoint URL:
-
domain name: Replace
{{domain name}}
with your Salesforce instance domain. For example, if your Salesforce domain isyourdomain.my.salesforce.com
, useyourdomain.my.salesforce.com
. -
version: Replace
{{version}}
with the API version you are using. For example, if you are using version 52.0 of the API, usev52.0
. -
query: Replace
{{query}}
with your SOQL query. For example, the query can beSELECT+name+FROM+Account
Note : We have the flexibility to make requests not just through standalone APIs but also by leveraging SOQL queries within the REST API.
Sample SOQL Format
https://{{domain name}}/services/data/{{version}}/query?q={{query}}
Instances of queries could look like:
To apply filtering based on custom field values, we can utilize the following query format :
https://{{domain name}}/services/data/{{version}}/query?q=SELECT+id__c,backorder__c,Brand__c,Category__c,Created_Date__c,Supplier__c,Location__c,Item_Name__c,Item_Number__c+FROM+Item__c+WHERE+Location__c = 'New-York'
To apply filtering based on minimum and maximum time values, we can utilize the following query format :
https://{{domain name}}/services/data/{{version}}/query?q=SELECT+Id,Backorder__c,Brand__c,Category__c,Created_Date__c,Supplier__c,Location__c,Item_Name__c,Item_Number__c+FROM+Item__c+WHERE+Location__c='New-York'+AND+Created_Date__c >= '2023-01-01T00:00:00Z'+AND+Created_Date__c <= '2023-12-31T23:59:59Z'
Refresh Token Method: POST (This method is fixed and cannot be changed)
Refresh Token Header: By default, the header configuration remains as specified.
{"Content-Type":"application/x-www-form-urlencoded"}
Refresh Token Endpoint URL: By default, this will be set.
https://login.salesforce.com/services/oauth2/token
For detailed information, please consult the Salesforce Documentation, as the Refresh Token Endpoint URL may vary.
Refresh Token Endpoint Body:
Configuration Keys in Refresh Token Endpoint Body :
-
grant_type
: Specifies the grant type being used for authentication. Common types include "password" for resource owner password credentials and "client_credentials" for client credentials. -
client_id
: Represents the unique identifier assigned to the client (application) by the authorization server during the registration process. -
client_secret
: Serves as a confidential key known only to the application and the authorization server. It's used to authenticate the identity of the client application. -
username
: Refers to the username or identifier of the user accessing the API. This is typically used in combination with the password grant type. -
password
: Represents the user's password associated with the provided username for authentication purposes when using the password grant type.
These keys are utilized in constructing the API endpoint URL to exchange credentials securely and obtain an access token required for accessing protected resources through the API.
Note: Various API endpoint URLs feature distinct placeholders, therefore, users need to input all relevant details based on their specific requirements. Please refer to the Salesforce API documentation for further information.