A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
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
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
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