You are here:
Create Return Order Action
In Salesforce Order Management, create a return order and return order items for order items belonging to an order summary. You can add return fees for any of the order items.
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 Create Return Order.
Set Input Values
Use values from earlier in the flow to set the inputs.
| Input Parameter | Description |
|---|---|
| Return Order Input | This input is an Apex-defined variable of class ConnectApi.ReturnOrderInputRepresentation. The variable has four fields:
|
Store Output Values
| Output Parameter | Description |
|---|---|
| Return Order Output | This value is an Apex-defined variable of class ConnectApi.ReturnOrderOutputRepresentation. The returnOrderId field contains the ID of the created return order. |
Usage
To set up the Create Return Order Input:
- Use Assignment elements to set the canReduceShipping, orderItemSummaryId, quantityExpected, quantityReceived, and reasonForReturn field values on one or more ConnectApi.ReturnOrderLineItemInputRepresentation variables.
- If you want to add any return fees, use Assignment elements to set the amount, amountType, description, product2Id, and reason field values on one or more ConnectApi.ReturnOrderLineItemFeeInputRepresentation variables. The product2Id points to a fee product that you created.
- Use Assignment elements to add the ConnectApi.ReturnOrderLineItemFeeInputRepresentation variables to the returnOrderLineItemFees fields on the ConnectApi.ReturnOrderLineItemInputRepresentation variables representing the associated return order items.
- Use an Assignment element to add the ConnectApi.ReturnOrderLineItemInputRepresentation variables to the returnOrderLineItems field on a ConnectApi.ReturnOrderInputRepresentation variable.
- Use Assignment elements to set the orderSummaryId, returnOrderLifeCycleType, and status field values on the ConnectApi.ReturnOrderInputRepresentation variable.
- Use the ConnectApi.ReturnOrderInputRepresentation variable in the action input.
