You can change the sequence of the record mappings to make sure the related data is exchanged in the right order.
Standard procedure
Click Connectivity studio - Integration Design.
On the Message tab in the list, find and select the desired message.
Click Edit.
You can move a selected record up in the record mapping sequence.
In the Mapping section, in the Target record pane, find and select the desired record.
Click Move up.
You can move a selected record down in the record mapping sequence.
In the Mapping section, in the Target record pane, find and select the desired record.
Click Move down.
Close the page.