Upsert Record Action
The Upsert Record action allows you to create or update a record dynamically in the Salesforce database. This action ensures data integrity by either inserting a new record or updating an existing one based on a unique key.

Key Features
- Combines Insert and Update functionalities.
- Ensures data integrity by preventing duplicate records.
- Allows specifying additional input parameters for field values.
Configuring an Upsert Record Action
When adding an Upsert Record action, the following fields must be configured:
1. Common Properties
- Label:
- A user-friendly name for the action, displayed in the process flow.
- Required field.
- Name:
- A unique identifier for the action, used internally.
- Required field.
2. Inputs
The inputs section defines the parameters required to perform the upsert operation. The following fields are available:
Required Fields
-
Unique Key:
- Specifies the unique field used to identify whether to update an existing record or insert a new one.
- Examples:
ExternalId__c
,Email
.
-
SObject API Name:
- Specifies the Salesforce object where the record will be created or updated.
- Examples:
Account
,Contact
,CustomObject__c
.
Additional Inputs
- You can define additional field values for the record being created or updated:
- Name: API name of the field (e.g.,
Name
,BillingCity
,CustomField__c
). - Type: Data type of the field (e.g., String, Number, Boolean).
- Value: Value to assign to the field.
- Name: API name of the field (e.g.,
Example:
Field Name | Type | Value | Comment |
---|---|---|---|
fields.Name | String | Acme Corp |
Sets the name of the record to “Acme Corp”. |
fields.BillingCity | String | Los Angeles |
Sets the billing city to “Los Angeles”. |
fields.CustomField__c | Boolean | true |
Updates a custom boolean field to true . |
Usage Example
Scenario: Upserting Contact Records
- Unique Key:
Email
. - SObject API Name:
Contact
. - Additional Inputs:
- fields.FirstName:
John
. - fields.LastName:
Doe
. - fields.Phone:
123-456-7890
. - fields.Email:
john.doe@example.com
.
- fields.FirstName:
Steps:
- Add an Upsert Record action to the process.
- Fill in the Label and Name fields.
- Specify the Unique Key (
Email
) to identify records. - Define the SObject API Name (
Contact
) for the object being upserted. - Add additional inputs to populate fields like
FirstName
,LastName
, andEmail
. - Save the configuration and test the process.
Best Practices
- Always validate the unique key field to ensure it is indexed for faster lookup.
- Ensure the Salesforce object and fields exist before using them in the action.
- Use sandbox environments for testing complex upsert operations.
- Leverage outputs to dynamically reference the created or updated record in subsequent steps.