How can I export the current shipping total after an order edit?
When you edit an order and remove a shipping line, the value of the shipping_lines.total_price
field will still include that removed shipping line.
To exclude removed shipping lines from the calculation, you can use the formula below in the Calculated Fields to get the value of the current shipping total price:
get_total([i.price for i in load_json_data({{ shipping_lines }}) if not i.is_removed])
If you also need to factor in refunds, then you can simply use the field shipping_lines.current_total_price
. This will give you the shipping price after both order edits and refunds.
Related Articles:
App: EZ Exporter
Tags: advanced features, shipping, shopify orders