Commerce Service Center allows returns and exchanges on orders that have been fulfilled.
The /atg/commerce/csr/returns/ReturnTools
class uses two methods to identify if an order is returnable:
isOrderReturnable
– Determines if an order is returnable by ensuring it is in a fulfilled state and that at least one item in the order is returnableisItemReturnable
– Determines if an individual item is returnable by ensuring the items quantity > 0. This API can be extended to support customizations
The states used to determine whether an order is returnable are configured in /atg/commerce/
using the
custsvc/util/CSRAgentToolsfulfilledOrderStates
property.
This example of the CRSAgentTools
identifies the following states as fulfilled and non-modifiable:
#states that indicate an order is fulfilled. fulfilledOrderStates=NO_PENDING_ACTION
To add a new fulfilled order state, add the state to the fulfilledOrderStates
. The following example adds a new fulfilled status, SHIPMENT_RECEIVED
, to /atg/commerce/custsvc/util/CSRAgentTools
so it to be recognized by the ReturnTools.isOrderReturnable
method:
#states that indicate an order is fulfilled. fulfilledOrderStates=NO_PENDING_ACTION,\ SHIPMENT_RECEIVED