How To Calculate Refund Amount

Hey all,

We have a flow setup to automate refunds on return approved triggers. To get the amount to refund we are using return.order.totalOutstandingSet.presentmentMoney. This works, for all customer originated returns, but when the return is originated via the admin this amount is always $0.

So my questions are…

  • What is the best way to calculate the total refund amount during the return process?
  • Why is totalOutstandingSet set to $0 for admin returns, but works for customer initiated returns?

Thank you!

Don’t know, but I forwarded to Shopify folks in Returns.

1 Like

If you returned it from the Admin, did you refund right there? If so, that’s why the outstanding balance is $0.

The returns team suggested doing something like:
Return closed → check if outstanding balance → refund

Hey @paul_n,

We did not do a refund through the admin and still the outstanding balance on the event was $0.

Return closed → check if outstanding balance → refund
Closing the return before the refund seems odd. Is this the normal flow of events?

That being said, we may end up just doing a manual refund any time we do a manual admin return. Whomever does the return is already in the admin and can do the refund. We wanted everything to go through a single return_approved flow, but this may be more hassle than it’s worth.