Salesforce
How to connect Dapta and Salesforce
Last updated
How to connect Dapta and Salesforce
Last updated
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