Correct Way To Check Order Is Not Fully Refunded/Cancelled

I’m automating some loyalty actions, and at a high level my flow is:

Order placed > Send Pending Loyalty Action > Wait 30 Days > Approve Loyalty Action if order is not returned.

There are a lot of Order attributes available in flow: transactionSet, netPaymentSet, etc. What is the proper way to check that an order has not been cancelled/fully refunded after the 30 day wait period? In the admin, these orders have the Payment Status of “Paid” or “Partially Refunded” (not fully refunded, we’d still approve the action if some of the order was still in the customer’s hands). I don’t see a property for getting this simple Payment Status field from the admin list.

My initial thought is to just check order.netPaymentSet.shopMoney.amount > 0 - but does this handle all cancel/refund scenarios?

Hi @David_Robinson

Have you checked out order.displayFinancialStatus?

Thanks! That appears to match the display in Admin. However, I think it might be simpler in my case to stick with order.netPaymentSet.shopMoney.amount > 0 unless there’s something weird with using that.