Concept Flow - Upsert behavior (update or insert)
Receive upsert request
Search for document matching filter
Found?
Yes→Update document
Insert new document
Return result
The database checks if a document matches the filter. If yes, it updates it; if no, it inserts a new document.