A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I recently got an email saying this field is going to be deprecated. I'm using this field in prod and need to find a replacement to carry the currency rate. I have a shop with a primary currency different than USD, and I need to be able to import the order in USD into Netsuite.
Thanks
Solved! Go to the solution
This is an accepted solution.
Hi all - thanks for reaching out about this and for the conversation here. You've raised some good points. At the moment, API responses will only return prices in the respective "total_price_set" fields (current_total_price_set, etc) which use the store's default currency and the currency (if any) that the order used as it's presentment currency - which is the currency that is shown to the customer when they make the purchase (this is dependent on the markets/currencies the merchant enables through Shopify Markets).
That said, the best option at the moment is likely through a third-party service to do the conversions if you do require the price value to be converted into USD when the merchant does not have this set up as their default shop currency/if it's not being used as the customer presentment currency.
Though, I'm going to forward on your comments here to our product team. I can't guarantee anything in terms of a reversion to using total_price_usd or a fix in general, but I am happy to advocate for this to be looked at. Like I mentioned, you both bring up some good points about how there could potentially be functionality built into an API call to make conversions automatically when needed to speed up data capture processes.
Hope this helps and thanks again.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
I don't see a direct replacement for this data.
Have you considered using an external conversion service? You can still get the total for the order, right?
Our app is suffering from the same issue. We can get the total for the order in the store currency, but we would also need the total in USD as we make a UsageCharge, which is only in USD.
A workaround using an external source seems redundant as Shopify converts currencies internally all the time.
I'm using a third-party API. That complexifies the flows, but it works.
Yes. But I need it in USD
This is an accepted solution.
Hi all - thanks for reaching out about this and for the conversation here. You've raised some good points. At the moment, API responses will only return prices in the respective "total_price_set" fields (current_total_price_set, etc) which use the store's default currency and the currency (if any) that the order used as it's presentment currency - which is the currency that is shown to the customer when they make the purchase (this is dependent on the markets/currencies the merchant enables through Shopify Markets).
That said, the best option at the moment is likely through a third-party service to do the conversions if you do require the price value to be converted into USD when the merchant does not have this set up as their default shop currency/if it's not being used as the customer presentment currency.
Though, I'm going to forward on your comments here to our product team. I can't guarantee anything in terms of a reversion to using total_price_usd or a fix in general, but I am happy to advocate for this to be looked at. Like I mentioned, you both bring up some good points about how there could potentially be functionality built into an API call to make conversions automatically when needed to speed up data capture processes.
Hope this helps and thanks again.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Thanks for the reply!
We made a quick workaround by parsing your https://cdn.shopify.com/s/javascripts/currencies.js page once a day and storing the conversion factors in a local database to maximize consistency throughout these conversions. We hope this currencies file is regularly updated and maintained!