SalesForce Integration

Read-only forum. Used to announce new releases of EASYProcess.

Locked
SteveCap
Posts: 329
Joined: August 26th, 2021, 9:18 am
Contact:

SalesForce Integration

Unread post by SteveCap »

DesignTime Revision 2028 and RunTime Revision 770 or higher are needed.

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
    Screenshot 2021-09-29 092036.png
    Screenshot 2021-09-29 092036.png (11.72 KiB) Viewed 6485 times
    Screenshot 2021-09-29 092036.png
    Screenshot 2021-09-29 092036.png (11.72 KiB) Viewed 6485 times
  • Promote Project to PD
  • Go to connection manager page.
  • Select SalesForce connection and the instance you just created.
  • Fill out the variables.
    Screenshot 2021-09-29 092902.png
    Screenshot 2021-09-29 092902.png (29.66 KiB) Viewed 6485 times
    Screenshot 2021-09-29 092902.png
    Screenshot 2021-09-29 092902.png (29.66 KiB) Viewed 6485 times
    • 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
        Screenshot 2021-09-29 093449.png
        Screenshot 2021-09-29 093449.png (3.52 KiB) Viewed 6485 times
        Screenshot 2021-09-29 093449.png
        Screenshot 2021-09-29 093449.png (3.52 KiB) Viewed 6485 times
      • Create a new Connected App or select an existing one.
        Screenshot 2021-09-29 093647.png
        Screenshot 2021-09-29 093647.png (6.27 KiB) Viewed 6485 times
        Screenshot 2021-09-29 093647.png
        Screenshot 2021-09-29 093647.png (6.27 KiB) Viewed 6485 times
      • Under API find the consumer key
        Screenshot 2021-09-29 093945.png
        Screenshot 2021-09-29 093945.png (7.5 KiB) Viewed 6485 times
        Screenshot 2021-09-29 093945.png
        Screenshot 2021-09-29 093945.png (7.5 KiB) Viewed 6485 times
    • 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.
    • Username - SalesForce Username
  • Can toggle ECC switch. If doing so then must go to ECC ServerManager to set the connection variables.
There are two SalesForce services. Request and QueryAPI.
Both use the sales force api which documentation can be found at
https://developer.salesforce.com/docs/a ... o_rest.htm
  • Request
    Screenshot 2021-09-29 095718.png
    Screenshot 2021-09-29 095718.png (51.9 KiB) Viewed 6485 times
    Screenshot 2021-09-29 095718.png
    Screenshot 2021-09-29 095718.png (51.9 KiB) Viewed 6485 times
    • 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.
    • 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
    Examples:
    • Get Account with Id = 0011E00001jcVKiQAM

      Code: Select all

      
      	Default
      	
      	GET
      	Account
      	
      	0011E00001jcVKiQAM
      	
      	
      
      
      Screenshot 2021-09-29 101233.png
      Screenshot 2021-09-29 101233.png (83.89 KiB) Viewed 6485 times
      Screenshot 2021-09-29 101233.png
      Screenshot 2021-09-29 101233.png (83.89 KiB) Viewed 6485 times
    • Delete Account with Id = 0011E00001jcVKiQAM

      Code: Select all

      
      	Default
      	
      	DELETE
      	Account
      	
      	0011E00001jcVKiQAM
      	
      	
      
      
    • Update Account with Id = 0011E00001jcVKiQAM

      Code: Select all

      
      	Default
      	
      	PATCH
      	Account
      	
      	0011E00001jcVKiQAM
      	
      	
      		
      			BillingCity
      			Chicago
      		
      	
      
      
      Or

      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
    Screenshot 2021-09-29 101809.png
    Screenshot 2021-09-29 101809.png (40.83 KiB) Viewed 6485 times
    Screenshot 2021-09-29 101809.png
    Screenshot 2021-09-29 101809.png (40.83 KiB) Viewed 6485 times
    • 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.
    Example:
    Query Account where Id = 0011E00001jcVKiQAM. Return Id, Name, BillingAddress

    Code: Select all

    
    	Default
    	Account
    	
    		
    			
    			Id
    			=
    			0011E00001jcVKiQAM
    		
    	
    	
    		
    			Id
    		
    		
    			Name
    		
    		
    			BillingAddress
    		
    	
    
    
    Screenshot 2021-09-29 102245.png
    Screenshot 2021-09-29 102245.png (76.8 KiB) Viewed 6485 times
    Screenshot 2021-09-29 102245.png
    Screenshot 2021-09-29 102245.png (76.8 KiB) Viewed 6485 times
word count: 717
Locked