How can I export my shipping cost from the Shopify order?
EZ Exporter can pull the shipping label price from the Order Timeline entries ("Events").
The events field in the API contains all the order events, so we'll need to filter and parse the messages to pull out the shipping label price using the app's Calculated Fields features.
If the event/timeline message looks something like below:
John Doe purchased a $6.16 shipping label and the included shipping insurance premium.
Then we can pull out that 6.16 value (without the currency symbol) using this formula in the Calculated Fields:
strip_non_numeric_chars(get_value_by_position([i.message for i in load_json_data({{ events }}) if i.action == "shipping_label_created_success"], -1).split("purchased a")[1].split("shipping label")[0].strip(), except_chars=".")
If the event/timeline message looks different in your store (e.g. if the shipping insurance premium is not included), then please contact us and we can help you create a formula for it.
Related Articles:
App: EZ Exporter
Tags: shopify orders, shipping, faq