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.

"amountSpent" market (and price list) based

"amountSpent" market (and price list) based

ThinkingAbout_s
Shopify Partner
19 0 4

Customers "amountSpent": is it possible to get that data with presentment price and currency of the secondary market? e.g.: UK (GB) with GBP price-list. Or with "contextualPricing" with country context GB (as for the variants). Because we need to export that specific data.

This is because UK customers shop in pounds.

 

Thanks and best

Replies 2 (2)

ShopifyDevSup
Shopify Staff
1453 238 525

Hey @ThinkingAbout_s ,

 

The customer object, specifically the amountSpent, doesn't have the presentment price and currency as its only displayed in the store's currency. You might be able to use the orders object and query with a specific customer ID and get some of the details you are looking for as a work around; example below:

 

{
 orders(first: 10, query: "customer_id:6783024103744") {
   nodes {
     id
     presentmentCurrencyCode
     netPaymentSet {
       presentmentMoney {
         amount
       }
     }
   }
 }
}

 

I'll submit the feedback on including this information on the customer object for future consideration.

 

Hope that helps! 
 

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

ThinkingAbout_s
Shopify Partner
19 0 4

It seems a bit risky and "expensive".
The goal is to do a daily export of customers (new or updated), with the complete data for their "total_spent", based on the currency (to send it to a CRM). By making a query on the orders, we would have to do it every time on all the orders of the exported users and calculate the total ourselves.

It seems quite strange to us that you can't get the "amountSpent" based on the currency directly, now that you can manage different markets with different currencies.

 

Is there a different solution?

 

Thanks