You are here:
Allow Multiple Credit Types for Refunds
You can use all Order Management service flows out of the box, and you can also customize a flow and expand its functionality. This customization lets you process returns as unreferenced refunds. Unreferenced refunds are disconnected from the original payment method, so the funds can be returned to any credit type. You can enable unreferenced refunds in the return and RMA flows.
Before customizing the flows, add credit types to your store to provide a wider selection of credit types to assign refunds to. All orgs by default have the Credit type created and enabled. Only enabled credit types are available in your flows.
This task provides information about customizing both the Return RMA flow and the Return Item flow. To enable unreferenced refunds for Return RMA, modify both the Return RMA flow and the Create Credit Memo and Ensure Refund flow. To enable unreferenced refunds for Return Item, modify the Return Item flow.
-
Click
at the top of the page, and then select Setup.
- In the Quick Find box, enter flows, and select Flows.
- Select the Return RMA flow, Create Credit Memo and Ensure Refund flow, or the Return Item flow template. The template has the Template column of the table checked.
- In a different tab, find and open your existing version of the flow you’re modifying.
-
To modify the Return RMA flow, use the template as a reference. Create or modify each of
these variables and elements in your cloned flow.
Insert these variables:
- paymentCredit
- refund
- refundInstructionsHint
- Payment Credit Sequence - Collection Sort
- Refund Sequence - Collection Sort
- Refund Instruction Hint Input Representation - Transform
- Return Order Input: Add an assignment for the refund instruction hint.
- Preview Changes: See steps 8 through 12.
-
To modify the Return Item flow, use the template as a reference. Create or modify each of
these variables and elements in your cloned flow.
Insert these variables:
- paymentCredit
- refund
- refundInstructionsHint
- Ensure Payment Credit Sequence - Collection Sort
- Ensure Payment Credit Input - Transform
- Ensure Refund Sequence - Collection Sort
- Ensure Refund Sequence Input - Transform
- Ensure Refund Input - Assignment
- Return Order Input: Add an assignment for the refund instruction hint.
- Preview Changes: See steps 8 through 12.
-
To modify the Create Credit and Ensure Refund flow, use the template as a reference. Create
or modify each of these variables and elements in your cloned flow.
Insert these variables:
- paymentCreditSequence
- refundSequenceItemOutputRepresentation
- refundSequenceList
- refundSequenceEntry
Insert these text templates:- GetRecordsReturnReturnOrderItemsFaultDescription
- GetRecordsReturnReturnOrderItemsFaultMessage
- CreateInvoiceInvocableFaultMessage
- ReturnReturnOrderItemsInvocableFaultMessage
- CreateCreditMemoInvocableFaultMessage
- EnsureRefundsInvocableFaultMessage
- EnsurePaymentCreditInvocableFaultMessage
Insert these elements:- Ensure Payment Credit Amount
- Ensure Payment Credit Required? - Decision
- Payment Credit Sequence - Assignment
- Payment Credit Sequence - Collection sort
- Ensure Refund Input - Transform
- Ensure Payment Credit - Action
- Ensure Payment Credit Fault Description - Assignment
- Payment Credit - Loop
- Payment Credit - Update records
- Credit Memo - Get records
- Ensure Refunds Required? - Decision
- End - End
- Refunds Hint - Assignment
- Refunds Hint - Collection Sort
- Refunds Hint - Loop
- Refund Sequence Entry - Assignment
- Refund Sequence List - Assignment
Make these element modifications:- Ensure Refunds Input: Insert the refundsSequenceList.
- Fault Description: Change to Ensure Refunds Fault Description and replicate component.
- For both the Return Item and Return RMA flows, find and select PreviewChanges.
- Select OMS Change Review.
- Set Use Setup Refund Instructions to true.
- Set the Use Credit Types field to true.
-
Set the Payment Credit Type entries field.
Use all credit types Keep the field empty. Specify each credit type Enter the API name of each credit type in the field as a comma-delineated list. Create a custom list of credit types Create a text list variable in the flow.
After the Set Stage to Stage 5 Assignment, create an Assignment. Create a resource and select Variable as the type. Name the variable, set the Data Type to Text, and allow multiple values. Click Done.
Use the new list as a variable to create an assignment for each credit type, with or without conditions.
In the PreviewChanges element, enter that list in the Payment Credit Type entries field.
- Save your flow.

