ReturnItemAdd command

This command adds products to a return merchandise authorization (RMA). 

Command structure

http://host_name/path/
The fully qualified name of your WebSphere Commerce Server and the configuration path.

Diagram of the command structure: the command starts with the fully qualified name of your WebSphere Commerce Server and the configuration path, followed by the command name, ReturnItemAdd  and the ? character. End the command with a list of parameters in the form of name value pairs. Separate each name value pair with the & character. For a detailed description of the parameters and their values, refer to the list entitled Parameter values.

Parameter values

forUser
The logon ID of the user on whose behalf the command will be run; only a person with the authority to process orders can specify this parameter.
forUserId
Same as forUser, but identifying the user by the internal user ID, as found in the USERS table.
creditAdjustment_i
The amount by which to adjust the product credit amount. The format of this number must fit the rules for a java.math.BigDecimal object. The number must use a period for a decimal place. This amount is placed in the ADJUSTMENT column of the RMAITEM table. This parameter is optional and only valid if the forUserId parameter is specified.
langId
Sets or resets the preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table.
storeId
(Required) The store reference number.
orderItemId_i
(Required) The OrderItem ID, if available. To return a component that is not part of a dynamic or static kit, or the entire kit from an OrderItem, a value must be specified for this parameter. To return a part of a dynamic or static kit that has an OrderItem, a value must be specified for this parameter and the catEntryId_i parameter.
catEntryId_i
(Required) The catalog entry being returned. This value must be either a product or an item. Other catalog entry values are not supported and will call a BAD_MISSING_CMD_PARAMETER exception. To return a component that is not an OrderItem, a value must be specified for this parameter. To return a part of a dynamic or static kit that has an OrderItem, a value must be specified for this parameter and the orderItem_i parameter.
attrName_i
Any distinct attribute defined for the product.
attrValue_i
The value of the product attribute.
RMAId
(Required) The identifier of an existing RMA that the return items are to be added to. To create a new RMA, use "**" as the value. If a value is not specified for this parameter, ** is used as the default.
quantity_i
(Required) The quantity being returned.
UOM_i
The unit of measure for quantity_i. This value should match one of the primary keys in the QTYUNIT table. When it is not specified, then the value of the QUANTITYMEASURE column of the CATENTSHIP table for the row with the same CATENTRY_ID as the OrderItem is used, and the value of the quantity_i parameter is multiplied by the NOMINALQUANTITY column of the same row in the CATENTSHIP table.
comment_i
A comment about the item being returned.
reason_i
(Required) The reason for the return, as provided by the purchaser. This value can be found in the CODE column of the RTNREASON table with reason type in 'B' or 'C'.
outRMAName
The name to use for the name-value pair which will be passed to the redirected URL. This parameter is useful for chaining commands. If this parameter is not specified, then the value of the RMAId parameter is used.
URL
(Required) The URL to be called when the command completes successfully.

Example

The following example adds 5 units of order item 15 to a new RMA. The reason code for the return is DEFECT. After the RMA is created it is displayed.

http://myhostname/webapp/wcs/stores/servlet/
ReturnItemAdd?;orderItemId_1=15&quantity_1=5&reason_1=DEFECT&RMAId=**&storeId=1;&URL=ReturnDisplay

Behavior

Exception conditions