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?