Overview
This guide shows how to update or insert a record in a table in Okta Workflows. In database terminology, an update and insert operation is an upsert.
Solution
There is a table with department information. Each record has an ID, name, and number of employees.
In database terminology, an update and insert operation is an upsert, which means updating a record if it already exists in a table or inserting a new record if it does not exist in a table.
The following flow does an update if a record exists or inserts a new record if the record does not exist.
When the flow has the following inputs (in the Assign card), it finds a matching record and updates it. The flow runs the If condition and the Update Row card.
This is the table after the flow updates the Marketing record:
When the flow has the following inputs (in the Assign card), the flow does not find an existing record and inserts a new record. The flow runs the Else condition and the Create Row card.
This is the table after the flow inserts the Security record:
Related References
