The “Update or Create” operation is now available on your favorite connectors.
This post describes the new function using a trigger and action flow, but the same capability is also available for API flows.
From inside an App Connect flow, you can invoke an operation on connectors that performs a create or update depending on whether a record that satisfies a certain condition exists in the backend system. This operation is sometime referred to as an upsert (update or insert).
Say for example, when a new Marketo lead is created, you want to either create or update a Salesforce Lead that matches this record.
You add your Marketo Lead trigger and then the Update or Create Salesforce Lead action, you use the first and last names as a filter, and then you use the “Auto Match” button to copy the matching data across.
If the filter returns zero items, a new Salesforce Lead is created with the values from the “Populate target” section.
If one record satisfying the condition is found, the fields will be updated with the values from the mappings.
If several records are found, you will get a flow error, displayed on the dashboard. There might be more records to update than you have intended.
You can start to type “Update or Create” in the Application panel to see all the connectors that support this mode of interaction.