Area: Optimizely Commerce
Applies to versions: 11 and higher

Using the return order form

Recommended reading 

This topic describes how to use the APIs to create a return order form and an exchange order. See also: Blog post CartHelper is dead, long live IOrderRepository.

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.
    • 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.
  • 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.
    • CompleteReturn. Completes a return form.
  • CreateExchangeOrder. Creates an exchange order from a purchase order.
Do you find this information helpful? Please log in to provide feedback.

Last updated: Jul 31, 2017

Recommended reading