🔧Salesforce
How to connect Dapta and Salesforce
The Salesforce integration is an integration process that requires several setup steps in Salesforce before any connection or configuration in Dapta. These steps go as follows:
Open Setup
Open your Salesforce account and go to the settings configuration on the top right with the tool icon.
Application setup
Go to “Platform tools” and to the section called “App management” if you have this in English or “Gestor de aplicación” in Spanish
New application
Click on create new application. It’ very important that if you get two options for the creation, you go with “New connected app” and then with “Create a connected application”
Dapta URL
Once you’re on this screen, make sure you fill out with the Dapta required information.
For the name, you can go with anything that helps you identify the app. Something like “Dapta conector” is recommended. Ad for the email you can set your own so that you can get any inconsistency emails from Salesforce
Permission set
Once you have set that up, go ahead an check the permissions that are needed. For this type of integration, it’s really important to set the permissions to set the permissions to “Full access” so that we can perform READ AND WRITE operations via the Salesforce API.
It’s also important to check the options for “Activate the OAuth configuration”, “Require secret” for both web server and token update. And also require key for “PKCE”
The final step for this is checking these four options:
These options are “Activate the client credential flow”, “Activate the flow for authorization and credentials”, “Require user credentials at the POST body for the authorization and credential flow” and “Emit access token based on JSON web tokens “JWT” for named users. These will allow us to connect via the Salesforce API. Once you hit on save, this will create the application
Execute as admin user
Once the app has been created you can go to the “Modify” option at the top three options and go to the “Connected app manager option”
THIS IS VERY IMPORTANT. Make sure you mark the option for “Execute as” and you TYPE YOUR USERNAME. This is not very intuitive but you have to type the user name that appears on your Salesforce account at the top right
Make sure you type it just as it appears on the platform. If you don’t complete this step, the connection will not work.
Make sure you also type your user name at the “Client credentials” flow section
Request the auth token
Once the app has been created, make sure you go to “Manage” and select the option to “Manage” at the “key and consumer secret”.
This will provide you with the “consumer key” and the “client secret”
Perform the API requests
Once you have all of the information you can proceed to completing requests via Dapta.
The first thing you’re going to need is a custom API node with a POST method that requests the Salesforce token like this.
Make sure you replace “YOURCOMPANYDOMAIN” with your actual company domain and add the following body that will contain the credentials you extracted on previous steps
This post method will generate a token with which you are going to be able to perform any get or post request by adding it to the header as a Bearer token.
Recommendations
Salesforce’s API allows you to do Queries based on an SQL format so if you want to search for particular information you can do so by setting the following body at the previously exemplified Endpoint
If you want to post information, be that updating objects or creating new ones, you can use regular PATCH and POST methods with the information structure that you have on your CRM
Last updated