If more than one cost center is assigned to an order, it is necessary to choose which items in the order belong to each cost center. Items are assigned to cost centers through a type of relationship called a CostCenterCommerceItemRelationship
.
The CostCenterShippingGroupRelationship
and CostCenterOrderRelationship
can be used if costs are more conveniently tied to shipping groups or orders, rather than commerce items. This also allows tracking of shipping and tax costs.