Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Need some help? Contact us:

...

 

 

The Salesforce adapter component is designed to help you connect and interact with the Salesforce API. It includes a simple example of retrieving and updating an account. It is designed in a way for you to easily adapt and build additional functionality quickly.

Expand
titleSign up for a Salesforce and create a form to collect data

Refer to Setup a Salesforce Developer Account for the sign up process and gathering the Salesforce authentication details needed for the Salesforce Adapter.

...

Expand
titleConfigure your domain and authentication details in the Salesforce Adapter Custom Fields
  • Input your developer account domain

  • Consumer Key as the ClientID

  • Consumer Secret as the ClientSecret

The Key does not need to be entered. SALESFORCEcustom module first queries the Salesforce token endpoint using the OAuth2.0 client credentials workflow to obtain the token and sets it to the encrypted Key custom field.

The API version is set to default to v59.0. You can find what version you are using by going to <your domain>/services/data/.

Screen Shot 2024-02-14 at 12.52.45 PM.png
Expand
titleClick Edit to Open the Translator and view the how the script works

The Salesforce Library contains lua files for various method calls used to interact with Salesforce objects via the API:

  1. SALESFORCEclient - creates the Salesforce adapter framework, adding the various method modules to a metatable and storing the configurations added to the custom fields.

  2. SALESFORCEcustom - takes in any API requests and parameters to make the API call and return the response. It also performs the OAuth2.0 authentication workflow to obtain the token to be used in subsequent requests.

The methods are set up so they’re independent of salesforce objects, so they can be used for any custom objects you may have in your Salesforce setup:

  1. SALESFORCEquery - By default, retrieves all the fields for a given object, up to 200 fields. Can be customized by using the query parameter.

  2. SALESFORCEmodify - creates or updates a Salesforce object by passing the object name, id and a table of fields and values to be created or updated in the object.

  3. SALESFORCEmodifyBatch - creates or updates a batch of Salesforce objects by passing a list of operations to be performed on Salesforce objects as table of parameters.

  4. SALESFORCEdelete - deletes a Salesforce object by specifying an object name and id.

Screen Shot 2024-02-14 at 2.51.27 PM.pngImage Removed

SALESFORCE Library is used to create a Salesforce client and call different methods against the Salesforce API. The example workflow included:

  • Queries Salesforce for an Account Object named “Jiffy Dry Cleaning“

  • If the call was successful and an Account object that meets the query exists then modify the object by passing the Object name, id, and parameters to update (the industry)

Screen Shot 2024-02-14 at 2.51.27 PM.pngImage Added