The priority of a Relationship is important during order processing. A relationship’s type determines its priority. If relationships are the same types, the priority is determined by the order in which the relationships were created.
When an Order is being processed or fulfilled, the system moves through the relationships of CommerceItems, ShippingGroups, and PaymentGroups in the following order:
Shipping Priority
ShippingQuantityShippingQuantityRemaining
Commerce Item Payment Priority
PaymentAmountPaymentAmountRemaining
Shipping Cost Payment Priority:
ShippingAmountShippingAmountRemaining
Tax Cost Payment Priority:
TaxAmountTaxAmountRemaining
Order Cost Payment Priority
OrderAmountOrderAmountRemaining

