HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


How it works:

  • EPiServer.Commerce.Order.IReturnOrderForm – Information about a return order form. This interface inherits IOrderForm. The ReturnForms collection in IPurchaseOrder was changed from ICollection<IOrderForm> to ICollection<IReturnForm>.

  • EPiServer.Commerce.Order.IReturnLineItem – Information about a return line item. This interface inherits ILineItem. The LineItem class inherits IReturnLineItem and contains OriginalLineItemId.

  • EPiServer.Commerce.Order.IReturnLineItemCalculator – Calculates the extended price for an IReturnLineItem.

    • GetExtendedPrice – Gets the extended price for an IReturnLineItem.

    • GetDiscountedPrice – Gets the discounted price for an IReturnLineItem.

  • EPiServer.Commerce.Order.IReturnOrderFormCalculator – Calculates totals on an IReturnOrderForm

    • GetHandlingTotal – Gets the handling total for an IReturnOrderForm.

    • GetSubTotal – Calculates the total of all shipments in an IReturnOrderForm.

    • GetTotal – Gets the total for an IReturnOrderForm.

    • GetOrderDiscountTotal – Gets the discount price of an IReturnOrderForm.

    • GetDiscountTotal – Gets the discount total of an IReturnOrderForm.

  • EPiServer.Commerce.Order.IShippingCalculator – Add API.

    • GetShippingReturnItemsTotal – Gets the total of process for all return line items in the shipment.

  • EPiServer.Commerce.Order.ITaxCalculator – Add APIs.

    • GetShippingReturnTaxTotal – Gets the tax total for a return shipment that contains.

    • GetReturnTaxTotal – Gets the return tax total for an IReturnOrderForm.

  • EPiServer.Commerce.Order.IPurchaseOrderFactory – Creates an instance of purchasing order components.

    • CreateReturnOrderForm – Creates the return order form for a purchase order.

      See also: Blog post [CartHelper is dead, long live IOrderRepository](🔗).

      
    • CreateReturnShipment – Creates a shipment for the return.

      
    • CreateReturnLineItem – Creates a return line item from original line item, with return quantity and reason.

      
    • CreateExchangePayment – Creates a payment for an exchange order.

      
  • EPiServer.Commerce.Order.IReturnPurchaseOrderCalculator – Calculates return totals on a purchase order.

    • GetTotal – Gets the return total of all return order forms.

      
    • GetSubTotal – Gets the return subtotal of all return order forms.

      
  • EPiServer.Commerce.Order.IReturnOrderNumberGenerator – Generates the return order form number and exchange order number.

    
  • EPiServer.Commerce.Order.IReturnOrderFormExtensions – Extensions for the return order form.

**Extensions**

  • CanCreateExchangeOrder – Checks whether it can create an exchange order from a return order form.

  • IsEditable – Checks whether a return order form is editable.

  • IsCancellable – Checks whether a return order form is cancellable.

  • IsCompletable – Checks whether a return order form is completable.

  • IsAwaitingCompletable – Checks whether a return order form is awaiting completable.

  • EPiServer.Commerce.Order.IReturnOrderService – Handles operations on IReturnOrderForm such as complete, cancel a return, or acknowledge a return's receipt items. Also provides an operation to create an exchange order from a purchase order.

  • AcknowledgeReceiptItems – Acknowledges the receipt of items on a return form.


  • CancelReturn – Cancels a return form.



Note that the purchase order was saved but was not recalculated. It needs to be recalculated and saved.


  • CompleteReturn – Completes a return form.



Note that the purchase order and the exchange order (if any) were saved but not recalculated. They need to be recalculated and saved.


  • CreateExchangeOrder – Creates an exchange order from a purchase order.



After creating exchange order, if you are using PurchaseOrder (from IPurchaseOrder) and OrderAddress (from IOrderAddress), the address needs to be cloned from the original purchase order to the exchange order.