How to perform an upsert in Salesforce
Workato action Create or Update object in Salesforce allows you to perform an Upsert action in Salesforce. That is, Salesforce will attempt to create an object with the provided values in the fields.
However, when a Primary Key field is specified, and the object already exists with an identical value in the given Primary Key field, Salesforce will identify the existing object, and update the existing object with the values that were provided.
Primary Key field
Specify a field that allows you to uniquely identify a specific record for the object. Next, make sure that the given field is filled with the value that would be used to look in Salesforce.
Upsert Condition
The provided Primary key field and value should only match to one specific object. If more than one object was found, the recipe will throw an error to notify of such situation.
Can I use more than 1 Primary Key?
The simple answer is, no. However, there is a simple workaround. You can do a search action based on the Full Name, and have a conditional action stating if the Size (from the Search) is greater than 1 -- this evaluating as true would mean there are multiple records with that Full Name. There may be instances where there are two objects in a stated primary field contains more than one record for a particular value. If you would like to search for a record using 2 fields such as Full Name and Account, it would be best to use a Search action with both of those parameters and use conditional actions to check if present before updating or creating.