How do I export the refunded total of all the refunded line items from a Shopify order?

To export the refunded total (including taxes) of all refunded line items from a Shopify order, you can use the formula below in the Calculated Fields section of EZ Exporter:

get_total([rli.subtotal for rli in load_json_data(flatten_list([i.refund_line_items for i in load_json_data({{ refunds }})]))]) + get_total([rli.total_tax for rli in load_json_data(flatten_list([i.refund_line_items for i in load_json_data({{ refunds }})]))])

This is quite coomplicated as it requires parsing the raw refunds data which is deeply nested.


Related Articles:


App: EZ Exporter

Tags: advanced features, refunds, calculated fields