How do I export a breakdown of multiple refund transactions from a Shopify order?
In EZ Exporter, there's a pre-computed field called refunds.transactions.total_amount
which will export the total amount of all refund transactions.
Since a Shopify order can have multiple refund transactions, you may also want to see a breakdown of them, displaying the transaction date and amount of each one.
You can use the formula below in the Calculated Fields section of the Data Settings to export a breakdown of refund transactions in the format "Refund Transaction Date: Amount":
"\n".join([format_datetime(tx.created_at, "%Y-%m-%d %H:%M:%S") + ": " + str(tx.amount) for tx in load_json_data({{ refunds.transactions }}) if tx.status == "success"])
Sample output:
Related Articles:
App: EZ Exporter
Tags: advanced features, refunds