How can I export prices in the customer's local currency from a Shopify order?

Most of the price/money fields are in the shop's currency by default (except refunds which are in the customer's currency) but the API also provides the "presentment" amount for certain price fields.

In EZ Exporter, we can pull these values in the customer's local currency using the formulas below in the Calculated Fields.

Total Price in the Customer's Currency

get_attribute_value({{ total_price_set.presentment_money }}, "amount")

Subtotal Price in the Customer's Currency

get_attribute_value({{ subtotal_price_set.presentment_money }}, "amount")

Total Lineitems Price in the Customer's Currency

get_attribute_value({{ total_line_items_price_set.presentment_money }}, "amount")

Total Tax in the Customer's Currency

get_attribute_value({{ total_tax_set.presentment_money }}, "amount")

Total Discounts in the Customer's Currency

get_attribute_value({{ total_discounts_set.presentment_money }}, "amount")

Shipping Price in the Customer's Currency

get_attribute_value({{ total_shipping_price_set.presentment_money }}, "amount")

Lineitem Unit Price in the Customer's Currency

get_attribute_value(get_attribute_value({{ line_items.price_set }}, "presentment_money", recursive=False, return_raw_results=True), "amount")

Lineitem Total Price in the Customer's Currency

float(get_attribute_value(get_attribute_value({{ line_items.price_set }}, "presentment_money", recursive=False, return_raw_results=True), "amount")) * {{ line_items.quantity }}

Lineitem Total Discount Amount in the Customer's Currency

get_total([i.amount_set.presentment_money.amount for i in load_json_data({{ line_items.discount_allocations }})])

Lineitem Total Discount Percentage in the Customer's Currency

(get_total([i.amount_set.presentment_money.amount for i in load_json_data({{ line_items.discount_allocations }})]) / (float(get_attribute_value(get_attribute_value({{ line_items.price_set }}, "presentment_money", recursive=False, return_raw_results=True), "amount")) * {{ line_items.quantity }})) * 100

To also export the currency that was displayed to the customer when the order was placed, simply select the field called presentment_currency.


Related Articles:


App: EZ Exporter

Tags: advanced features, shopify orders, shopify multi-currency