Pipelines perform the majority of the returns and exchange process and are defined in atg/commerce/commercepipeline.xml and stored in/atg/commerce/csr/returns/.
ReturnsPipelineConstants
contains the pipeline parameter constants that call into the pipeline chains and pass parameters. Pipeline IDs are configured using the ReturnManager.

Create Return Request Pipeline

The createReturnRequest pipeline chain initializes a new ReturnRequest. It includes the following processors:

Processor

Description

SetOriginatingOrder

Determines the originating order for the return and sets the originatingOrder property.

SetPromotions

Determines the promotions that are used for pricing the working orders and sets the itemPromotions and orderPromotions properties.

LoadReplacementOrders

Loads replacement orders for all related returns. Items from replacement orders populate the working order and provide refund calculations. This process sets the relatedReplacementOrders property.

SetPricelists

Generates the price lists used when pricing replacement and working orders. Generates the pricelist and salePriceList properties.

SetItemPriceSources

Sets the ItemPriceSource property. ItemPriceSource objects allow you to provide pricing information based upon a specific Product/SKU combination. The override is then used in place of the default current day pricing.

InitPreReturnPromotionValues

Generates the values of the promotions before performing the return. The prePromotionalValue property values are used when calculating the change in promotion values.

InitShippingCostShares

Creates the shipping cost share value map by setting the shippingCostMap property.

SetOriginOfReturn

Sets the originOfReturn property for the ReturnRequest.

SetReturnShipmentRequired

Sets a returnShipmentRequire flag for each ReturnItem.

GenerateReplacementOrder

Creates a replacement order for an exchange process by setting the replacementOrder property.

Confirm Return Request Pipeline

This chain completes the return creation process. It includes the following processors:

Processor

Description

ValidateRefundTotal

Validates the refund total. To perform a return, the refund must be greater than 0.

RemoveUnallocatedRefundMethods

Removes refund methods that have no refunds allocated.

ValidateRefundMethodAllocations

Validates that the current refund is greater than 0 and that the RefundMethod allocations equal the refund amount.

AssociateAgentWithReturnRequest

CSC Only. Sets the agentID property of the ReturnRequest.

UpdateStateOfReturnItems

Updates the state of each ReturnItem based on their current quantity value.

UpdateReturnRequestState

Updates the state of the ReturnRequest based on the state of the ReturnItems.

ReturnCommerceItems

Identifies the CommerceItem and quantity as being returned.

PrepareReplacementOrderToSubmit

Runs a pre-submission process on the replacement order.

SettleReturnRequest

Conditionally executes the settlement pipeline to settle the return immediately. This occurs if the processImmediately flag is set to true, or if none of the ReturnItems require return shipment.

SaveReturnRequestToRepository

Saves the ReturnRequest data to the repository.

SendReturnSubmittedEvent

Sends a submitted return reporting event.

Settle Return Pipeline

The settleReturn pipeline chain settles a return, issues credits and sends the order to fulfillment. It includes the following processors:

Processor

Description

SettleCredits

Credits the payment groups and assigns refund store credits to the owning profile.

ExecuteSubmitReplacementOrder

Starts the pipeline that submits the replacement order to fulfillment.

MarkReturnRequestAsProcessed

Marks the return as settled, preventing any further settlements.

SendReturnCompletedEvent

Sends a return completed event for reporting.

Submit Replacement Order To Fulfillment Pipeline

The submitReplacementOrderToFulfillment pipeline chain submits the replacement order for processing. It includes the following processor:

Processor

Description

SubmitReplacementOrder

Submits the replacement order to fulfillment.

Generate Replacement Order For Exchange Pipeline

The generateReplacementOrderForExchange pipeline chain is executed to create a replacement order for an exchange. It includes the following processors:

Processor

Description

InstantiateReplacementOrder

Creates a replacement order instance.

SetOriginOfReplacementOrder

Sets the origin of the replacement order based on the CSC parameter Map. The BaseFormHandler sets the original parameter value to the configured value.

In CSC, this value in the ReturnFormHandler is set to replacementOrderOrigin=contactCenter.

CreateReplacementOrderShippingGroups

Creates the shipping groups in the replacement order based on the shipping groups in the original order.

CreateReplacementOrderPaymentGroups

Creates the payment groups in the replacement order based on the payment groups in the original order.

Prepare Replacement Order Pipeline

This pipeline chain prepares the replacement order for submission and includes the following processors:

Processor

Description

ExecuteValidateForCheckoutChain

Executes a Commerce pipeline that validates that the order is ready for checkout.

RemoveEmptyShippingGroups

Removes shipping groups without relationships.

RemoveEmptyPaymentGroups

Removes payment groups without relationships.

CreateImplicitRelationships

Creates relationships for orders that have a single shipping or payment group with no relationships.

SetPaymentGroupAmount

Sets the amount of the payment groups based on the group’s relationships.

AuthorizePayment

Authorizes payment groups in the order.

SetSalesChannel

Sets the sales channel of the replacement order based on the CSC extra parameter. Identifies where the order was submitted. The BaseFormHandler sets the sales channel extra parameter Map to its configured value. The ReturnFormHandler for CSC will set the sales channel to contactCenter.

UpdateReplacementOrderStateOnConfirm

Updates the replacement order state to “pending customer return”.

AddOrderToRepository

Adds the replacement order to the repository.

Calculate Refund Amounts Pipeline

The calculateRefundAmounts pipeline chain calculates the suggested and actual refund amounts for a return. It includes the following processors:

Processor

Description

ResetRefundAmounts

Resets the suggested and actual refund values in the ReturnRequest to 0.

GenerateItemCostAdjustments

Generates the ItemCostAdjustment objects in the ReturnRequest that is used to calculate suggested amounts.

CalculateSuggestedRefunds

Calculates the suggested refund amounts for each ReturnItem and the ReturnRequest.

AdjustSuggestedAmountsForNonReturnItems

Adjusts the ReturnReqeusts suggested amount to account for ItemCostAdjustments that have been generated for non-return items.

SetActualRefundsFromSuggestedRefunds

Sets the actual refund amounts from the suggested refund amount.

CalcuateReturnFee

Calculates the return fee.

Apply Selected Items Pipeline

The applySelectedItems pipeline chain processes the selected ReturnItems. It includes the following processors:

Processor

Description

ValidateSelectedItems

Validates that there are selected return items that contain valid return quantities.

CreateReturnItemList

Regenerates the returnItemList and returnItemMap properties based on the selected ReturnItems.

InitReturnCalculationOrder

Creates the Return Calculation Order based on the selected ReturnItems.

ResetGWPMetaData

For an exchange, resets any properties that contain Gift with Purchase meta-data needed to generate gift selection for the replacement order when a gift is returned.

CalculateNewAmounts

Calculates new suggested and actual refund and promotion values.

ValidateRefundTotal

Validates the refund total, which must be greater than 0.

InitRefundMethods

Initializes the refund methods and the generated store credits used for the replacement order.

Apply Refund Allocation Pipeline

The applyRefundAllocation pipeline chain allocates the refund across the RefundMethods. It includes the following processors:

Processor

Description

ValidateRefundTotal

Validates the refund total, which must be greater than 0.

ValidateRefundMethodAllocations

Validates that the current refund for a return is greater than 0 and that the RefundMethod allocations equal the refund amount.

UpdateStoreCreditAllocations

Updates the refund store credit based on the refund method allocation.

Record Merchandise Return Pipeline

The recordMerchandiseReturn pipeline chain is run for each ReturnItem that is received for a return. It includes the following processors:

Processor

Description

UpdateReturnItemOnReceive

Updates the ReturnItem to account for the quantity received.

UpdateInventoryOnReceive

Conditionally updates the inventory for the quantity received.

UpdateReturnRequestState

Updates the state of the ReturnRequest based on the ReturnItems.

SettleReturnRequest

Conditionally executes the pipeline to settle the return.


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