The Salesforce Library contains lua files for various method calls used to interact with Salesforce objects via the API: SALESFORCEclient - creates the Salesforce adapter framework, adding the various method modules to a metatable and storing the configurations added to the custom fields. 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.
MethodsThe 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: SALESFORCEquery - By default, retrieves all the fields for a given object, up to 200 fields. Can be customized by using the query parameter. 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. 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. SALESFORCEdelete - deletes a Salesforce object by specifying an object name and id.
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)
|