Customer count different from api vs ui

anandkartik97
Visitor
3 0 0

I'm using the admin api (/admin/api/2024-01/customers/count.json?created_at_min=2024-01-01) to query the customer count and its different from the count on the UI 

Replies 4 (4)

Liam
Shopify Staff
2731 302 783

Hi Anandkartik97,

 

Are you seeing any trends around the discrepancies? (ie: not including deleted customers) There also could be a time-based factor that is causing this - a you seeing a big difference in the two numbers?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me 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

anandkartik97
Visitor
3 0 0

Hi @Liam 
Yes, the difference seems to be big so I believe I'm missing out on something. I am not including the deleted customers.
Is there any reference you could help with to get the active customer count from the Shopify UI and API?

Liam
Shopify Staff
2731 302 783

If you query with the GraphQL customer API - do you get the same results?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me 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

anandkartik97
Visitor
3 0 0

@Liam Thanks. Yes, I am getting the same results from the REST and GraphQL API. Is there a reference you could provide me with for the following: I want to count monthly active customer count (active means if the customer has made a purchase in the last 12 months, so for Jan 2023 it would be the count of unique customers who have made atleast 1 purchase between 2022-02-01 till 2023-01-31 )