One of the greatest strengths of data flows is the ability to control transaction scope using envelopes. Related operations are placed into a single envelope. Return data from a patch can be used for data in subsequent operations via tokens. Envelopes represent a transactional boundary or scope for not only envelope tokens but more importantly for the validation of the contained operations.
The individual patch operations of an envelope follow the all-or-none principle. If an operation in an envelope fails - for any reason - all the operations in the envelope will rollback leaving the database in the same state as before. The response will include the errors that caused the rollaback.
This feature can be very helpful when integrating with another system, for example, a CRM pushing new account data and orders as a single transaction. By wrapping the entire process in a single transactional envelope we avoid the possibility of partially completing the process.
Consider the case of an invalid address in the customer data preventing billing information from being created. A system integrator would need to create logic to manage many formats to correct the issue (one for each thing that could go wrong). Using a dataflow, the account and products would not be created and we would receive an error message indicating that the address was invalid, the system integrator can use the returned error to notify the CRM so that the salesperson can correct the address and resend the order using the same format as the original.