I have a cloud function which listens for document updates within a collection. If a special field is updated, I want to move this document to another collection.
Ca
Firebase Firestore do not support moving data; Its better to copy to new and delete existing.
If your data is kind of transaction data;
make sure execute operations in transaction block (delete only when copy is success)
Also you can ensure using [ .validate() ] delete only if its exist in copied node
Firestore currently doesn't offer a "move" operation. You'll have to do what you proposed in your question: copy the document yourself in a transaction.