Need to be able to stop a refund from happening on shopify, if a customer support rep tries to refund an order without checking if there is an open PO in our ERP.
In a perfect world, it would work like this:
Customer rep goes to an order to refund it. hits the process refund button, and then my code would get called and check the order status in the ERP. If it comes back with an open PO, it will error our and then the refund window in shopify would get a Error as well, and prevent the refund from happening.
I can write the code, thats no issue. Just unsure, how to go about this. Would I need to build a shopify app and some how tie it into the refund window in shopify? Is that even possible?