To configure and run the Create Salesforce Object Tool script, follow these steps to set up your Salesforce credentials and define the parameters to create or update Salesforce records.
1Open the Create_Salesforce_Object_Tool tool connection.
2On the Code tab, uncomment the configuration block and enter the following property values:
- SALESFORCE_USERNAME
- SALESFORCE_PASSWORD
- SALESFORCE_SECURITY_TOKEN
- SALESFORCE_CLIENT_ID
- SALESFORCE_CLIENT_SECRET
The following snippet shows a sample configuration block:
ENV_FILE = ".env" answer = ""
#Set Salesforce credentials and comment it after first run #set_key(ENV_FILE, "SALESFORCE_USERNAME", '') #set_key(ENV_FILE, "SALESFORCE_PASSWORD", '') #set_key(ENV_FILE, "SALESFORCE_SECURITY_TOKEN", '') #set_key(ENV_FILE, "SALESFORCE_CLIENT_ID", '') #set_key(ENV_FILE, "SALESFORCE_CLIENT_SECRET", '')
After the initial run, you can remove these values.
Alternatively, you can manually add these values to your environment variables.
3On the Input Parameters tab, enter values for the following parameters:
Parameter
Description
Action
Operation to perform on the Salesforce record like create or update fields.
Object
API name of the Salesforce object to create the record.
Data
Dictionary that contains field names and their corresponding values to create or update the record.
Object_ID
Salesforce record ID required for update operations.