Insert or Update Records Using the Upsert Operation
This use case provides an overview of how to use the upsert operation in an integration.
You can use the upsert operation to insert a new record or update an existing
record in the Salesforce application. To determine if the record is already
present, the upsert operation uses a unique key for matching the record. The
unique key is a custom field declared as External Id
field in the Salesforce application.
- If the key does not match, a new object record is created.
- If the key matches once, the existing record of the object is updated automatically.
- If the key matches more than once, an error is generated, and the object record is not inserted or updated.