What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: total_price_usd deprecated

Solved

total_price_usd deprecated

sylvblends
Shopify Partner
3 0 1

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

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1453 238 525

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

View solution in original post

Replies 6 (6)

Snodgers
Shopify Partner
25 1 14

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?

ville_k_sizeme
Shopify Partner
4 0 0

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. 

sylvblends
Shopify Partner
3 0 1

I'm using a third-party API. That complexifies the flows, but it works. 

sylvblends
Shopify Partner
3 0 1

Yes. But I need it in USD

ShopifyDevSup
Shopify Staff
1453 238 525

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

ville_k_sizeme
Shopify Partner
4 0 0

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!