SALESFORCE Create record function

The SALESFORCE Create record function in RPA.

Help CentreFunctions & Formulas

This article describes the RPA Salesforce connector function to create a new record.

For a full list of available functions, please read SALESFORCE functions.


Description

The Create record function creates a new sObject record in Salesforce. Specify the sObject type (e.g. Account, Contact, Lead) and provide field values as additional parameters. The created record’s ID is returned.


Setting it up

{{popups:rpas/add:action=salesforce-create-record}}

Once on a process map:

  1. Navigate to the process where you would like to add the function
  2. Click on the green button’s drop-down (right side of the green button labelled “Process”)
  3. On the menu that appears, click on the “+ Activity” item
  4. From here you can select the SALESFORCE Create record option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
ConnectorYesSelect-Select the Salesforce connector to use
sObjectYesText-sObject type (e.g. Account, Contact, Lead, Opportunity)
Fields (JSON)YesTextarea-JSON object of field values, e.g. {"Name":"{name}","Industry":"Technology"}
VariableYesText-Variable to store the result

Output variables

VariableTypeDescription
VariableObjectObject with id (the new record ID), success (true/false), and errors array

Errors

  • REQUIRED_FIELD_MISSING – a required field was not provided
  • INVALID_FIELD – a field name does not exist on the sObject
  • DUPLICATE_VALUE – a unique field value already exists

Tips

  • Use Describe sObject to discover required fields before creating records
  • Use variables in JSON values: {"Email":"{email}","LastName":"{last_name}"}
  • Access the new record ID via {variable.id}

Related functions

  • Update record – Update an existing record
  • Get record – Retrieve a record by ID
  • SOQL query – Query records

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.