<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Update or Insert a Record in a Table in Workflows (Upsert example)
Okta Classic Engine
Okta Identity Engine
Workflows

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.


Department table  

 

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.

 

Workflows - Update or insert a record into a table  

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.

 

Update a record in a table

This is the table after the flow updates the Marketing record:

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.

 

Insert a record into a table

 

This is the table after the flow inserts the Security record:

Table after insert 

Related References

 

 

Loading
Update or Insert a Record in a Table in Workflows (Upsert example)