Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

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.

 Sign 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.

 Import the Salesforce Adapter component

See Create a Component if this is your first time!

 Configure 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
 Click 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.

Methods:

  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.png

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)

  • No labels