SalesForce Integration
Posted: September 29th, 2021, 10:25 am
DesignTime Revision 2028 and RunTime Revision 770 or higher are needed.
First thing is to setup the connection information for SalesForce.
Both use the sales force api which documentation can be found at
https://developer.salesforce.com/docs/a ... o_rest.htm
First thing is to setup the connection information for SalesForce.
- Go to the connector application and create a new project.
- Add New -> Connection Instance. Type = SalesForce
- Promote Project to PD
- Go to connection manager page.
- Select SalesForce connection and the instance you just created.
- Fill out the variables.
- APIVersion - The api version you want to use. Most current as of 09/29/2021 is 52.0
- ConsumerKey - The ConsumerKey for the connected app in SalesForce
- Login to SalesForce.
- In Menu find App Setup -> Create -> Apps
- Create a new Connected App or select an existing one.
- Under API find the consumer key
- ConsumerSecret - The ConsumerSecret for the connected app in SalesForce
- Follow sames steps as ConsumerKey to find ConsumerSecret
- Password - SalesForce password
- SecurityToken - SalesForce SecurityToken
- This token is regenerated every time the supplied user changes their password.
- When resetting password the token will be sent to you via email.
- Url - The base SalesForce Url that you login to.
- Example: https://na70.salesforce.com/
- Username - SalesForce Username
- Can toggle ECC switch. If doing so then must go to ECC ServerManager to set the connection variables.
Both use the sales force api which documentation can be found at
https://developer.salesforce.com/docs/a ... o_rest.htm
- Request
- ConnectionInstance - The name of the connection instance you created above
- Url - The api url you wish to call
- This is an override and in most cases can be left blank. If filled out Object and Id will be ignored.
- If blank the url will be formed using the connection instances Url and API Version along the services Object and Id
- Method - the verb you want to use to call the api
- GET, POST, PUT, DELETE, PATCH
- Object - the object (table) you want to interact with
- Headers - Any headers you want to add to the api call.
- Authorization is auto added based on the connection instance information.
- Passing Name = Authorization will override the auto added header.
- Authorization is auto added based on the connection instance information.
- Id - the id of the object you want to interact with
- HttpContent - json object to pass to api
- Fields must be empty to use HttpContent
- Fields - NameValue pairs which will be converted to json to pass to the api in place of HttpContent
- Get Account with Id = 0011E00001jcVKiQAM
Code: Select all
Default GET Account 0011E00001jcVKiQAM
- Delete Account with Id = 0011E00001jcVKiQAM
Code: Select all
Default DELETE Account 0011E00001jcVKiQAM
- Update Account with Id = 0011E00001jcVKiQAM
Or
Code: Select all
Default PATCH Account 0011E00001jcVKiQAM BillingCity Chicago
Code: Select all
Default PATCH Account 0011E00001jcVKiQAM { "BillingCity": "Chicago" }
- QueryAPI
This service calls SalesForce's query api.
https://developer.salesforce.com/docs/a ... _query.htm- ConnectionInstance - The name of the connection instance you created above
- Object - the object (table) you want to query against
- Keys - keys for the where clause of the query
- Results - the fields you want returned.
Query Account where Id = 0011E00001jcVKiQAM. Return Id, Name, BillingAddressCode: Select all
Default Account Id = 0011E00001jcVKiQAM Id Name BillingAddress