Upsert Records
Overview
Upsert a single or multiple Salesforce records by using a record or record collection variable.
This action respects user permissions for Field Level Security and Object Level Security.
Inputs
Record
A single record that will be upserted.
Type |
---|
Record |
Records
A collection of records that will be upserted.
Type |
---|
Record Collection |
External Id Field Name
The API Name of the External Id Field used to determine if the record(s) being upserted should should insert or update depending on if a record already exists with the value.
This will default to Id
if not defined, which allows record to be inserted and updated at the same time.
Type | Default Value |
---|---|
Id | Id |
External ID Lookup Field Mappings
Set field mappings that enable lookup fields to be automatically set based on External ID fields in related objects. The format is a CSV of Lookup API Field Name:Related Object External ID API Field Name
.
For example, let's say there is an Account record with an External_ID__c field containing a value of NS-1234
. If you are inserting Contact records you can set the AccountId field
to NS-1234
on the Contact and pass in the following value to this configuration input.
AccountId:External_ID__c
Upon record create or update, the AccountId lookup field on the Contact will automatically point to the Account with the value of NS-1234
in the External_ID__c field.
Type |
---|
Text |
Outputs
Record
The single record after the upsert. If the record was created, the ID field is available on this record.
Type | Variable Name |
---|---|
Record | record |
Records
The record collection after after upsert. Records created will have the ID field available.
Type | Variable Name |
---|---|
Record Collection | records |