How do I export the currency exchange rate that was used in the Shopify order?

The Shopify Order API provides the prices both in the presentment currency (i.e. the customer's local currency) and the shop currency.

To figure out the exchange rate that was used when the order was placed, we can simply divide the amount in the shop currency by the amount in the presentment currency.

In EZ Exporter, you can use the Calculated Fields feature with the formula below to export the exchange rate based on these values:

round_half_up(float(get_attribute_value({{ total_price_set.shop_money }}, "amount")) / float(get_attribute_value({{ total_price_set.presentment_money }}, "amount")), decimals=5)

Here's a sample output where the shop's currency is in EUR:

This can then be used to convert the prices in the transaction data, which are available only in the presentment currency, to the shop currency.


Related Articles:


App: EZ Exporter

Tags: advanced features, shopify order export, currency conversion