ItemCostAdjustments are an integral part of the return process as they capture changes in cost for both returned and non-returned items. Non-return items are any item/shipping group relationship combinations that do not have any portion being returned in the current request.

The aggregate total of the ItemCostAdjustments are used to determine the refund amounts for the return.

The following is an example of ItemCostAdjustments:

public class ItemCostAdjustment
{
      String mCommerceItemId – The original commerce item id for the adjustment
      String mShippingGroupId – The original shipping group for the adjustment

      double mAmountAdjustment – the delta amount
      double mOrderDiscountShareAdjustment – the order discount share delta
      double mManualAdjustmentShareAdjustment – the manual adjustment share delta
      double mTaxShareAdjustment – the tax share delta
      double mShippingShareAdjustment – the shipping share delta
}

For return items, the sum of the ItemCostAdjustments is used to set the refund properties on the return item. Once the return request is saved, the ItemCostAdjustments for that return item are discarded.

For non-return items, the ItemCostAdjustments are used to offset the calculations for the total refund value in the return request. ItemCostAdjustments for non-return items are maintained on the return request itself. And unlike the ItemCostAdjusments for return items, ItemCostAdjustments for non-return items are saved to the repository on the return request.

There can be multiple ItemCostAdjustments per item. Hence, any number of ItemCostAdjustments can be added for the return or non-return items to adjust the refund value for the return.

ItemCostAdjustments are calculated based on the price deltas between the working orders. For example, price differences between the Return Adjusted Order (RAO) and the Return Calculation Order (RCO), and price changes between the RCO and Promotion Evaluation Order (PEO). For information on working orders, refer to the Working Orders section.

ReturnManager contains the following method that initiates the process of creating all the ItemCostAdjustments for the return:

protected void generateItemCostAdjustments(ReturnRequest pReturnRequest)
throws ReturnException
Non-Return Item ItemCostAdjustments

The ReturnRequest contains the following API related to ItemCostAdjustment for non-return items:

public void addNonReturnItemCostAdjustment(ItemCostAdjustment
    pItemCostAdjustment)
public void addNonReturnItemCostAdjustments(Collection
    pItemCostAdjustments)
public void clearNonReturnItemCostAdjustments()
public Collection getNonReturnItemCostAdjustments()
Return Item ItemCostAdjustments

ReturnItem contains the following API related to ItemCostAdjustments for the item:

public void addItemCostAdjustment(ItemCostAdjustment pItemCostAdjustment)
public void addItemCostAdjustments(Collection pItemCostAdjustments)
public void clearItemCostAdjustments()
public collection getItemCostAdjustments()
Return Tools ItemCostAdjustments

ReturnTools provides an API for working with ItemCostAdjustments. The following API is called to create all ItemCostAdjustment objects. For example, if you need to extend the ItemCostAdjustment, this method can be extended to return the new sub-class:

protected ItemCostAdjustment createItemCostAdjustment()

The following API saves and loads the non-return item ItemCostAdjustments to the repository. These too can be extended for a new sub-class of ItemCostAdjustment.


Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices