The selectItems
actor-chain identifies the items that will be returned in the current return request. This actor-chain takes the input from an updated JSON-formatted return request and then uses that input to set the server-side shipping group list’s return item values. Note that you must update the shippingGroupList
items to set the number of items to be returned or exchanged, and the reason code. Refer to the Obtaining Return Reason Codes section for information on retrieving reason codes.
This actor-chain contains the following parameters:
Parameter | Description |
---|---|
| Identifies if the process is a return or an exchange. |
| Identifies the updated Jason-formatted return request where the item to be returned or exchanged in the |
Add Items to Return Example
curl -L -v -b customer_cookies.txt -H "Content-Type: application/json" –d "{\"processName\":\"Return\",\"jsonReturnRequest\":{\"returnRequest\": {\"shippingGroupList\":[{\"itemList\":[{\"id\":\"xcr10101\",\"shippingGroupId\": \"xcsg20080\",\"quantityToReturn\":1,\"returnReason\":\"didNotLike\", \"quantityToExchange\":0},{\"id\":\"xcr10102\",\"shippingGroupId\":\"xcsg20080\", \"quantityToReturn\":1,\"returnReason\":\"defective\",\"quantityToExchange\": 0}]}]}}}" "http://localhost:8181/rest/model/atg/commerce/custsvc/returns/ CSRReturnsActor/selectItems"
The following is an XML-based example:
curl -L -v -b customer_cookies.txt -H "Content-Type: application/xml" –d "<parameters><jsonReturnRequest>{"returnRequest":{"shippingGroupList": [{"itemList":[{"id":"xcr10101","shippingGroupId":"xcsg20080","quantityToReturn":1, "returnReason":"didNotLike","quantityToExchange":0},{"id":"xcr10102", "shippingGroupId":"xcsg20080","quantityToReturn":1,"returnReason":"defective", "quantityToExchange":0}]}]}}</jsonReturnRequest><processName>Return</processName> </parameters>" "http://localhost:8181/rest/model/atg/commerce/custsvc/returns/ CSRReturnsActor/selectItems"
The server response may be similar to the following:
{ "returnRequest":{ "returnPaymentState":"Refund", "otherRefund":0, "requestId":null, "state":"incomplete", "processName":"Return", "actualShippingRefund":12.62, "replacementOrderId":null, "originatingOrderId":"xco30045", "exchangeProcess":false, "returnAdjustedOrderId":"o350068", "orderCurrencyCode":"USD", "refundMethodList":[ { "refundType":"creditCard", "amount":113.62, "maximumRefundAmount":131.85 }, { "refundType":"storeCredit", "amount":0, "maximumRefundAmount":-1 } ], "returnItemCount":2, "actualTaxRefund":0, "returnItemList":[ { "quantityToExchange":0, "suggestedTaxRefundShare":0, "quantityReceived":0, "itemCurrencyCode":"USD", "returnItemId":"xcr10101", "actualTaxRefundShare":0, "refundAmount":50.52, "shippingGroupId":"xcsg20080", "quantityReturned":0, "quantityShipped":1, "quantityAvailable":1, "description":"Boyfriend Jeans", "quantityToReturn":1, "actualShippingRefundShare":6.31, "suggestedShippingRefundShare":6.31, "commerceItemId":"xci1000051", "catalogRefId":"xsku2519_2", "suggestedRefundAmount":50.52, "disposition":null, "returnReason":"didNotLike" }, { "quantityToExchange":0, "suggestedTaxRefundShare":0, "quantityReceived":0, "itemCurrencyCode":"USD", "returnItemId":"xcr10102", "actualTaxRefundShare":0, "refundAmount":51.44, "shippingGroupId":"xcsg20080", "quantityReturned":0, "quantityShipped":1, "quantityAvailable":1, "description":"Corduroy Cargo Pants", "quantityToReturn":1, "actualShippingRefundShare":6.31, "suggestedShippingRefundShare":6.31, "commerceItemId":"xci1000052", "catalogRefId":"xsku2512_2", "suggestedRefundAmount":51.44, "disposition":null, "returnReason":"defective" } ], "processImmediately":false, "rma":null, "returnFee":0, "orderId":"xco30045", "profile":{ "middleName":null, "lastName":"Smith", "id":"se-570085", "login":"jsmith@example.com", "firstName":"Joe" } } }