The ReturnRequest stores information related to a return and also sets and returns the working orders: Return Adjusted Order, Return Calculation Order, and Promotions Evaluation Order. It additionally returns a collection of ItemCostAdjustment objects that were generated for items not being returned and included when calculating the suggested refund amounts.

The ReturnRequest contains a price list and sale price list property that are passed to pricing operations on the working order. The list is based on the original order and any other exchange orders in the return tree. It maintains the original prices for the items to avoid inaccurate refund calculations when product prices have changed since the original purchase. Price lists are set using the createReturnRequest pipeline SetPricelists processor.

The ReturnRequest also identifies the number of items being returned, and identifies if the process is an exchange or return process. It then maps the commerce item and shipping group IDs in the originating order to their matching counter parts in the Return Adjusted Order.

The ReturnRequest holds the customer profile, which is determined by the order profileId used to create the return.

The ReturnRequest contains the following information:

Property

Description

priceList

The list price list for pricing the working and exchange order.

salePriceList

The sale price list used for pricing the working and exchange order.

profile

The external profile associated with the return.

otherRefund

The other refund value. This value is typically only used by call center applications such as CSC, where agents can adjust the return values.

nonReturnItemSubtotal
  Adjustment

The total adjustments made to the refund for non-returned items.

actualShippingRefund

The actual shipping refund amount.

actualTaxRefund

The actual tax refund amount.

authorizationDate and authorizationNumber

The authorization date and number for the return.

returnFee

The fee associated with a return.

returnItemList

The list of ReturnItems selected for the return.

order

The order from which the return was created.

processed

Indicates if the return has been settled.

refundMethodList

The list of refund methods that are associated with the return.

replacementOrder

The exchange order associated with the return.

shippingGroupList

The ReturnShippingGroups associated with the return.

state

The state of the ReturnRequest.

suggestedShippingRefund

The calculated suggested shipping refund amount.

suggestedTaxRefund

The calculated suggested tax refund amount.

agentId

The agent associated with the return. This value is typically set by call center applications, such as CSC, that create returns.

originOfReturn

The origin of return of the request.

getAllocatedAmount

Returns the total refund amount that has been allocated.

getUnallocatedAmount

Returns a total refund amount that is not allocated to a refund method.

getTotalItemRefund

Returns the aggregate total of all ReturnItem refundAmounts.

getTotalReturnItemRefund

Returns the aggregate total of all ReturnItem refundAmounts minus the non-returnable item adjustments.

getRefundSubtotal

Returns the total refund for the return, less the return.

getTotalRefundAmount

Returns the total amount of the refund for the return.

Return States

Return states can be defined using the /atg/commerce/csr/returns/ReturnStates component. This component uses the atg.commerce.states.ReturnStatesResources file to provide resourced definitions for the states.

Each state is defined using two different key prefixes. The first prefix is RETURN. The second prefix, RETURNDESC, provides the ability to create a more detailed description of the state. You can use the /atg/commerce/custsvc/returns/ReturnStateDescription droplet to provide more descriptive text for a state.

The ReturnRequest also provides two APIs for returning both resourced values:

public String getStateAsUserResource()
public String getStateDetailAsUserResource()

State

Description

RETURN.PENDING_CUSTOMER_ACTION

Approved

RETURN.PARTIAL_RETURN

Partial Return

RETURN.FULL_RETURN

Full Return

RETURN.INCOMPLETE

Incomplete

RETURNDESC.PENDING_CUSTOMER_ACTION

Approved

RETURNDESC.PARTIAL_RETURN

Partial return

RETURNDESC.FULL_RETURN

Full return

RETURNDESC.INCOMPLETE

Incomplete


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