Upsert is Update or Insert operation.
Sophia Upsert implementation allows to reduce Read-Modify-Write case to a single Write. Updates are applied by user-supplied callback db.database_name.upsert during data compaction or upon read request by sp_get() or sp_cursor().
To enable upsert command, a db.database_name.upsert and optionally db.database_name.upsert_arg must be set to callback function pointer.
Please take a look at sp_upsert() API for description and an example.