Data Flow: Shopify refund to NetSuite refund (add) flow
Error Code:billing_transaction_not_found
Error Message: “Failed to refund order #*********, No invoice/cash sale found in NetSuite.”
Reason: This error occurs when the flow could not filter and identify the cancelled orders and generate a customer refund.
Resolution: Adding the import filters for the fields “transaction.length”, “cancel_reason” and “cancelled_at” should resolve the problem. Apply the import filters as shown in the following image.

For the cancelled orders, the “cancel_reason” and “cancelled_at” fields will have some values, so by adding another filter on the refund flow, on the field “transaction.length”, will import only refunds with value as empty. This will ensure that none of the cancelled orders reach to NS Import Adapter.
This import filter will first check if “transactions.length” is not empty. In addition to this, the flow will also check if the refunds have empty “cancel_reason” and “cancelled_at” nodes. With this resolution, the flow will not miss any normal refunds, cancelled orders with transactions array.