Implementing return and exchange orders
Assumptions and limitations
Before initiating a return process, ensure that the sales order is invoiced. If the invoicing is not performed on the sales order, the refund amount is not defaulted on the return order payments.
Solution
Understand APIs, services, and other components that are used to implement the return and exchange order task.
Initiate a return process with order as an entry point
- If you are granted permission to handle return orders, when you log in to Sterling Store Engagement you can view the Return products portlet. The entry point is defaulted to order.
- When you enter or scan an order number, the
translateBarCodeAPI is called, which translates the bar code of the order number and returns the order number. ThegetOrderListAPI is called with this order number. - If the
translateBarCodeAPI does not return any translation, thegetOrderListAPI is called with the original input that you passed to thetranslateBarCodeAPI. If multiple translations are returned by thetranslateBarCodeAPI, an error message is displayed in the UI. - To search for orders, click Advanced search and specify additional
information. The
getOrderListAPI is called to retrieve orders that match the additional search criteria. - When you search for an order, the
getOrderListAPI is called.- If the API returns single or multiple orders, the order list is displayed.
- If the API does not return any order, an appropriate error message is displayed.
- The Modify search option does not include Search for return order.
Initiate a return process with product as an entry point
- If a customer does not have the order receipt, use product as an entry point for starting the
return process. This is called Blind Returns, which is determined by the
YCD_ALLOW_BLIND_RETURNrule. By default, this rule is enabled. If it is disabled, in the Return products portlet of Sterling Store Engagement you cannot view Product in the Search for drop-down list.To configure theYCD_ALLOW_BLIND_RETURNrule, complete the following steps:- Log in to Sterling Business Center as an Enterprise Administrator. The Business Center home page opens.
- From the Organization menu, select the organization for which you want to configure the rules.
- Click System Setup. The System Setup home page opens.
- Expand the Store Administration menu.
- Expand the Returns menu, and click Return Rules.
When you Log in to Sterling Store Engagement and go to Return products portlet, you can enter the product ID, bar code, or any relevant product keywords.
- The
translateBarCodeAPI is called that translates the input.- If the API returns a single translation in the output, the Item details
page is displayed. The
getCompleteItemListAPI is called that allows you to add products to the return order. - If the API returns multiple translations in the output, an appropriate error message is displayed in the UI.
- If the API does not return any translation in the output, the
searchCatalogIndexAPI is called and the item list page is displayed.
- If the API returns a single translation in the output, the Item details
page is displayed. The
- The Modify search option does not include Search for return order.
Initiate a return process with customer as an entry point
- After selecting customer as the entry point in the Return products portlet, the scan option is hidden. You must enter the customer details such as phone number or email of the customer as the search criteria and click the Search icon.
- To search for customers, click Advanced search and specify additional information. The
getCompleteCustomerListAPI is called to retrieve customer details that match the additional search criteria.- If the API retrieves multiple customers, the customer list page is displayed. You can view details such as the customer name, address, phone number, and email for each customer. Select the appropriate customer and click View orders to view the associated return orders for the selected customer.
- If the API retrieves only one customer, the customer list page is displayed where you can view the associate return orders for the selected customer.
- If the API does not retrieve any customer, an appropriate error message is displayed.
- The Modify search option does not include Search for return order.
Search for a return order with return order as an entry point
- When you scan or enter the order, the
translateBarCodeAPI is called that translates the bar code of the order number and returns the order number. With this order number, thegetOrderListAPI is then called.- If the
translateBarCodeAPI does not return any translation, thegetOrderListAPI is called with the original input that is passed to thetranslateBarCodeAPI. - If the
translateBarCodeAPI returns multiple translations, an appropriate error message is displayed.
- If the
- To search for return orders, click Advanced search and specify additional information. The
getOrderListAPI is called to retrieve return orders that match the additional search criteria.- If the API returns a single order, the Return Summary page is displayed.
- If the API returns multiple orders, the return orders are displayed.
- If the API does not return any order, an appropriate error message is displayed.
- In the Return order list page you can view the list of return orders that
matches your search criteria. You can view the return order number, number of products, channel,
store name (in case of store purchase), date, return order total, status, customer name, and so on.
In the Return order list page, draft return orders are not displayed. To narrow
down your search results, use the filter option and provide the filter criteria such as return order
date, status, and so on. The Return order list page supports infinite
scrolling. The
getOrderListAPI call fetches 10 records at a time. As you scroll through the page, the next set of orders are loaded. For each return order, a View action is provided that takes you to the Return order summary page. When you navigate away from the Return order summary page to the Return order list page, you can view the list of orders that matches your filter criteria. - In the Return order list page, you can view product thumbnails, a maximum of two product images for each return order. If there are more images to display, a text cue is displayed in the format, <count of remaining product images>.
- The Modify search option shows all the entry points, including Search for return order.
Select an order from the sales order list
When the getOrderList API returns multiple results, the order list page is
displayed with order details such as the order number, number of products, order channel, store name
(in case of store purchase), date, order amount, status, and customer name. The order list page
displays orders that match the search criteria. It also supports infinite scrolling. In each page,
10 records are displayed. You can scroll through pages that are loaded by the
getOrderList call. To narrow down the search result, you can filter return orders
based on the order number, number of products, order channel, store name (in case of store
purchase), date, order amount, status, and customer name. The order list page displays a maximum of
two product images for each order. If there are more images to display, a text cue is displayed in
the format: <count of remaining product images> More. To add products to return, click View and
select products to return from order view. For the associated return order, click View. The return
order summary page is displayed.
View and add products to a return order
- After identifying an order to return, in the Add Products to Return page you can view the return order lines.
- The
getCompleteOrderDetailsandgetCompleteOrderLineListAPIs are called to retrieve the order header and line details. - If the order does not contain returnable order lines, an appropriate message is displayed. You
cannot create return order for this order. This is determined by the
IsOrderReturnableattribute. It is mandatory that you specify theOrderLineelement in template to get this attribute. - Click Modify search to open the modal that displayed a text field that is painted with the entry point drop-down menu. You can add products from multiple orders to the same return order by using this field. You can also add blind return products to the return order.
- The order number and total number of order lines in the order are displayed as header details. The order date, customer name, and store details of the order are displayed as a tooltip with order number.
- The return cart icon displays the total number of products that are present in the return order. Initially, the mini cart displays a count of zero. When you click the mini cart, all the order lines for the return order are listed.
- If the
YCD_SHOW_RESHIP_ON_RETURN_ENTRYrule is disabled, and when you retrieve order lines for a sales order, only those lines withReshipParentLineKeyas null are retrieved.ReshipParentLineKeyQryTypeis set as ISNULL so that reship order lines are not fetched. If theYCD_SHOW_RESHIP_ON_RETURN_ENTRYrule is enabled, products that were reshipped to a customer are displayed. - The lines are sorted based on return and non-returnable lines. If you want to return serialized lines, you must scan or enter the serial number of the return order line. Even if you want to reduce the quantity, you must scan the serial number. For each line, the product description, product image, item ID, variation attributes (if any), quantity ordered, returnable quantity, returned quantity, and price are displayed.
- The returnable lines contain editable quantity widget to add products to the return order.
- Lines that cannot be returned might depend on the current product status or due to return policy violation.
- You can configure return policies in Sterling Business Center. To complete various
validations and override configurations through the Return Policy framework, complete the following steps:
- Select Organization Matrix-R and go to system setup.
- Select return order and then the return policy, for example
RETURN_UNIT_PRICE_LIMIT. - Click the Override Rules tab and select Override Rule.
- Configure Assign Course Of Action On Satisfying the Override Criteria.
- Ensure that the approver is a enterprise user.
- To add a product to the return order, when you click + or scan the
product, the
translateBarCodeAPI is called. If the API returns a valid translation, thegetOrderLineListAPI is called to retrieve order lines for the corresponding product.- If the order line is a returnable, the
createOrderAPI is called to create a draft return order. This API is called only for the first time. For subsequent draft return orders, thechangeOrderAPI is called. - If the order line cannot be returned due to return policy violation, the order line is not added to the return order and an appropriate error message is displayed.
- If the order line is a returnable, the
- For order lines with return policy violation can be overridden based on resource permission and
a new resource permission can be added for such lines. The
getCommonCodeListAPI withCodetype=WSC_RETURN_OVERRIDEis used to fetch the return override reason. ThechangeOrderAPI is called to override the violation. The default note text is added based on the override reason. TheYCD_OVERRIDE_RETURN_POLICY_NOTE_TYPErule is used as the note reason. - By default,
ISFConstants.YCDCHANNEL_COMMON_CODE_STOREis configured for the entry type that is used for theEntryTypeattribute while creating an order. - The customer information from the sales order is passed to the return order. The
OrderLineKeyattribute of the sales order's order line is passed to the order line of the return order. - The output returned from
createOrderorupdateOrderAPI is used to determine whether the quantity is updated for an existing order line or a new line is added. If theDerivedFromOrderLineKeyattribute on the return order line matches theOrderLineKeyattribute of the sales order, the existing return order line is updated. In scenarios where matching lines do not exist, a new return order line is added. - Blind returns are always considered as new return order lines and not associated with any sales order.
- For order line with multiple serials, when you add to a return order a new return order line is created for each serial.
View products added to a return order
- After you add all products that the customer wants to return and go to the Return list page, the
following APIs are called:
- The
getCompleteOrderDetailsAPI is called to fetch the return order details. - The
getCompleteOrderLineListAPI is called to fetch the return order line information.
The Returns list page also displays customer information if available for the return order. The Total panel displays cumulative total, charges, and taxes for the return order. You can delete return order lines from the return order by using the delete icon present in the line. The
changeOrderAPI is called to delete the return order line. - The
- The
getCommonCodeListAPI withCodeType=RETURN_REASONis called to fetch the return reason. - You can add return reasons to the return order lines and use a common reason for all lines or add specific reason for each line.
- The
changeOrderAPI is called to update the return reason. - If bill to date is not available for the sales order, customer identification window is
displayed in the Return list page. The
changeOrderAPI is called to update the order with customer details. An existing customer or a new customer can be registered in the Customer identification window.
Add exchange products to a return order
After adding all the products to a return order, a customer might request to add new products to
the return order. In such as situation, you can add new products as exchange in the Returns list
page. By default, after adding products to the return order an exchange order is not created. In the
Exchanges tab, you can add products as exchange by scanning the product. Otherwise, search for the
product and add to the return order. When you scan the product, the Item details page is displayed
where you can add products or blind products to the exchange order. The
getCompleteItemList API is called to add products to the exchange order.
When you enter the product keywords and click the search icon, the
searchCatalogIndex API is called to list the products and blind products that match
the search criteria. You cannot add PS, DS, and DSOPT products to the exchange order.
The exchange order flow is similar to the order capture flow. When you add the product to an
exchange order for the first time, the createOrder API is called to create the
exchange order. The ReturnOrderHeaderKeyForExchange attribute is set with the
OrderHeaderKey attribute of the return order. The ExchangeType on
the exchange order is set based on the YCD_DEFAULT_EXCHANGE_TYPE rule value. After
adding the product to the exchange order, you can change the delivery method and quantity on the
exchange order line. You can also mark an exchange order as gift at the line level and apply
coupons.
When you continue from Return list page, if an exchange order is present without any order lines, delete the exchange order.
Add return reasons to return order lines
You can add return reasons to return order lines. You can either add a common reason for all
lines or specific reason for each line or line quantity. The getCommonCodeList API
with CodeType=RETURN_REASON is called to fetch the return reason. The
changeOrder API is called to add return reason to the order line. If you want to
capture a different return reason for the line with multiple quantities, then split the line. This
means, first delete an existing line and add two new separate lines.
Return products without order or customer information
- You can create a return order for products that do not have order or customer information. Such return orders are referred as blind returns. You can create blind return orders by capturing the product information followed by other order fulfillment details. The blind return process starts when you use product as the entry point and scan the bar code or types of the relevant keywords. When you scan the bar code, the Item list or Item details page is displayed.
- The
getCompleteItemListAPI is called to fetch item details and display in the Item details page. In this page, you can view the item image, item description, item ID, current price, return price, and detailed description. - To add products to a return order, click the Add to Return button. If a return order is not yet
created, the
createOrderAPI is called that creates a return order. For an existing return order, thechangeOrderAPI is called. - When a customer is performing a blind return, the lowest unit price is displayed that is
configured across all price list lines from the configured number of days. The
getLowestItemPriceAPI is called to fetch the lowest price for the item. The lowest price is based on thePRICING_BLIND_RETURN_DAYSrule, which is used to configure theNumberOfDaysInPastattribute to find the lowest price for the product. If the rule is not configured, the default value is used, which is set to 90 days. The lowest price between the return order creation date and the number of days in the past that is configured is displayed as the return product price. The lowest price in all the price list lines between the current date andNumberOfDaysInPastis displayed as the return price. - When you add a product to the return order, the return price is stamped on the return order line so that the lowest price is refunded to the blind return order line.
- When you type the relevant keywords and search for the product in the Return entry portlet, the
searchCatalogIndexAPI is called to display products that match the keywords. - The item short description, item image, item ID, and unit price are displayed for each item. From the list of products, when you click the required product, the Item details page is displayed. You can view the lowest price, which is the return price for the products and add the products to the return order. You cannot view the price in the Item list page.
View customer list
A customer is a registered customer who wants to return products, but does not have the order
receipt. In such scenarios, the customer can provide the phone number or email address. The
getCompleteCustomerList API is called to display customers that matches the
provided information. The first name, last name, address, email ID, and phone number of the customer
are displayed for each customer. When you select the appropriate customer and click the View Orders
button, the Customer details page is displayed. The getOrderList API is called to
fetch orders for the customer. You can view all the orders and start the return process for the
selected customer.
Capture refund or payment
- When you navigate away from the Returns list page to the
Payments page, the
computeRefundPaymentsAPI is called for the return order to calculate the refund amount. - The
processReturnOrderAPI call defaults the payment methods from a sales order to the return order. The planned refund amount is populated for the return order payment methods only if the sales order has completed the shipment invoice generation. If multiple sales orders are used, see creating a return logic for computing refunds on return orders. - If an exchange order is not created for the return order, the total refund amount for the return
order is displayed along with the default sales order payment methods, and the corresponding planned
refund amount for each payment method. The
GrandRefundTotalattribute displays the refund amount to be refunded to the customer. - The
getCompleteOrderDetailsAPI is called to retrieve the return order details. - Each payment method of the return order is displayed in the Payment page. For new payment methods, which are valid for return (configured in Sterling Business Center) can be added to capture refund, if remaining.
- Do not pass payment methods that are computed from sales order to return order to the
capturePaymentAPI as input. You can determine this by comparing the requested amount with the planned refund amount for the corresponding payment method. If both the payment methods are the same, then theprocessOrderPaymentAPI must be called for that payment method. - Credit card payment method is not supported. However, if the same credit card that is used in sales order is available for returns, you can edit to update the requested amount.
- To process refunds, at least one payment type must be valid for returns.
- If an exchange order is associated for a return order, the
GrandExchangeTotalattribute displays the exchange order total and also displays the grand total and grand exchange total. - If the
EXCEED_CHARGE_AMOUNT_FOR_REFUNDrule is set at the organization level with DocumentType=0003, on calling theprocessReturnOrderAPI, the extra amount, if any is added to the available payment method. - If the grand refund total is greater than zero, customer gets a refund and the payment methods are displayed with the default planned refund amount. If it is lesser than zero, it indicates that the exchange order has a greater value than the refund amount, and the customer needs to pay the amount.
- When an exchange order has a higher value than the refund amount, the
getCompleteOrderDetailsAPI is called to fetch theRemainingAmountattribute fromRemainingFinancialTotalsto display the remaining amount to be paid to the customer. In this scenario, by default payment methods are not displayed. - The
capturePaymentAPI is called to capture payments for the exchange order. - The
getPaymentTypeListAPI is called for the payment types. ThegetCommonCodeListAPI withCodeTypeasYCD_CREDIT_CARD_TYPEis called to retrieve the list of credit card types. ThegetPaymentCardTypeListAPI retrieves a list of payment card types based on the input. - To update inventory, the default disposition code is passed to an order line in the
receiveOrderAPI as input. ThegetRuleDetailsAPI is called to fetch the default disposition code forWSC_RECEIVE_DEFAULT_DISPwithDocumentType=0003. - The APIs are called sequentially in the order of
startReceiptAPI, followed by thereceiveOrderAPI, and finally thecloseReceiptAPI. - For Store Inventory
Management (SIM) enabled store:
- To update the default location, the
receiveOrderAPI is called that invokes SIM API. - The
closeReceiptAPI calls SIM API to generate putaway tasks for the returned inventory. Stores can choose not to create putaway task for return orders through putaway preferences by configuring theputawayRequiredForReturnattribute. When you generate a putaway task endpoint (https://store.supply-chain.ibm.com/{tenantId}/v1/putaway-preferences),type: "RETURN"is passed for return orders, which is read by the SIM API to determine if putaway preferences must be read for returns. - The
receiveOrderAPI when called adjusts inventory withAdjustmentType = Return. - The saved customer payment methods is not handled in UI. Therefore, defaulting of charge on the default payment method, selecting an existing payment method to pay, or saving a new payment method for a customer is not handled.
- To update the default location, the
- The following business cases explain payment error handling and amount awaiting:
- If the authorization amount is awaiting, as a system administrator you can remove the payment method and retry the same or any other payment method. Otherwise, process the order.
- If any charge amount is awaiting, as a system administrator you must remove the payment method and retry the same or any other payment method. You cannot process the order with awaiting charge amount.
- If the payment process does not result in any error, the
confirmDraftOrderAPI is called for both return order and exchange order. - If the exchange order total is greater than the return order, you can handle error as follows:
- If a failed amount is captured as
AwaitingAuthInterfaceAmount, a system administrator can remove the payment method and retry the same payment method, or continue with order pressing. - If a failed amount is captured as
AwaitingChargeInterfaceAmount, a store associate must delete the payment method and retry.
- If a failed amount is captured as
- The following table explains the supported configurations for refunds based on the payment method:
Payment method Invalid for return Valid for return Refund to the same payment method Refund to a new payment method Credit card Y Y Y Gift card, cash Gift card Y Y N Gift card, cash Cash Y Y N Gift card, cash - When a return order is received, the
changeOrdermultiApi is called to automatically add a note with return number, channel, and associate name to all the sales orders from which the return order is created. ThechangeOrdermultiApi is called as multiple sales order exists from which the return is created. ThereceiveOrderAPI call when successful calls thechangeOrdermultiApi.
View return order and exchange order summary
- After you complete the return flow, the summary page is displayed. You can view the return order number, customer details, return total amount, return lines, and exchange lines.
- From this page, you can print the receipt and send an email to the customer.
- The
getCompleteOrderDetailsAPI is called to fetch the exchange order. - The
getPaymentTypeListandgetRuleDetailsAPIs are called forUSE_PMNT_CARD_TYPE_CONF_LEVELto display payment or refund summary.
Receive a preauthorize return that is created in a different channel and process refund
- You can search for a return order that is created in a different channel with return order as an entry point.
- You can also add exchange products to a return order.
- If
EntryTypeis not set to store, it indicates that the order is created in a different channel. If the order status is inNot receivedstatus, you can proceed with the order by using Sterling Store Engagement. - When you click Verify products to verify the products, the
Verify products page is displayed. The
getCompleteOrderDetailsAPI is called to retrieve the order details.Note: If you exit from the Verify products page without saving, information that you entered is lost. You need to verify the products again. If you complete the verification process and then go to the Return list page, a note is added withAuditTransactionIdasVERIFIED. Now, if you exit the note is used in the Order summary page and the Return list page is displayed for you can continue with the order. - You can continue with partial products verification. When you click Continue, a warning message is displayed. On confirmation, the unverified lines are canceled from the order. The Return list page is displayed that does not display the canceled lines.