You are here:
Return Order Items Action
In Salesforce Order Management, process one or more return order line items belonging to a return order. This action creates a change order record for the returned items and makes the processed return order line items read-only. You can include return order fees associated with the return order line items. If you do, a change order record is created for the return fees. If a processed return order line item has a remaining expected quantity, the action creates a separate return order line item representing that quantity.
Required Editions
| Available in: Lightning Experience |
| View supported editions. |
| This feature requires the Salesforce Order Management add-on. To purchase, contact your Salesforce account executive. |
In Flow Builder, add an Action element to your flow. Select the Order Management category, and search for Return Return Order Items.
Set Input Values
Use values from earlier in the flow to set the inputs.
| Input Parameter | Description |
|---|---|
| Return Order Id | Reference to the return order that you want to process return order line items from. |
| Return Items Input | This input is an Apex-defined variable of class ConnectApi.ReturnItemsInputRepresentation. It has three fields. The returnOrderItemDeliveryCharges field is an optional list of Apex-defined variables of class ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation. Each variable includes one field:
The returnOrderItemFees field is an optional list of Apex-defined variables of class ConnectApi.ReturnOrderItemFeeInputRepresentation. Each variable includes these fields:
The returnOrderItems field is a list of Apex-defined variables of class ConnectApi.ReturnOrderItemInputRepresentation. Each of the variables includes these fields:
|
Store Output Values
| Output Parameter | Description |
|---|---|
| Return Items Output | This output is an Apex-defined variable of class ConnectApi.ReturnItemsOutputRepresentation. It has three fields. The changeOrderId field is the ID of the change order record created for the returned item and delivery charges. Use this change order to create a credit memo. The feeChangeOrderId field is the ID of the change order record created for the return fees. Use this change order to create an invoice. The returnLineItemSplits field is a list of Apex-defined variables of class ConnectApi.ReturnOrderItemSplitLineOutputRepresentation, which includes these fields. After a change order is created for a return order line item, the return order line item is read-only. If this action is used to return a partial quantity, it creates a new “split” return order line item to hold the remaining quantity to be returned. In that case, it returns the IDs of the original and split return order line items in an element of the returnLineItemSplits output list property.
|
Usage
To set up the Return Return Order Items Input:
- Use Assignment elements to set the quantityReceived, quantityRejected, quantityReturned, quantityToCancel, reasonForRejection, and returnOrderLineItemId field values on one or more ConnectApi.ReturnOrderItemInputRepresentation variables.
- If you want to include a delivery charge, use Assignment elements to set the returnOrderLineItemId field value on one or more ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation variables.
- If you want to include a return fee, use Assignment elements to set the quantityReturned, quantityToCancel, and returnOrderLineItemId field values on one or more ConnectApi.ReturnOrderItemFeeInputRepresentation variables.
- Use an Assignment element to add the ConnectApi.ReturnOrderItemInputRepresentation variables to the returnOrderItems field on a ConnectApi.ReturnItemsInputRepresentation variable.
- Use an Assignment element to add the ConnectApi.ReturnOrderItemDeliveryChargeInputRepresentation variables to the returnOrderItemDeliveryCharges field on a ConnectApi.ReturnItemsInputRepresentation variable.
- Use an Assignment element to add the ConnectApi.ReturnOrderItemFeeInputRepresentation variables to the returnOrderItemFees field on a ConnectApi.ReturnItemsInputRepresentation variable.
- Use the ConnectApi.ReturnItemsInputRepresentation variable and the return order ID in the action input.

