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: How are you suppossed to get all abandoned carts via the GraphQL admin API?

How are you suppossed to get all abandoned carts via the GraphQL admin API?

LouiseEH
Shopify Partner
38 3 7

Hi,

 

In the query root of the graphql admin api there is a query "abandonment" which can be called via the id of the abandonment c.f. https://shopify.dev/docs/api/admin-graphql/2024-04/objects/QueryRoot. But where do you get the id from - where is the query on abandonments in general? I would expect there to be a service to be called to get all abandonments using the usual query parameters such as "first" or similar.

Kind regards,

-Louise

Replies 2 (2)

joshmoody24
Shopify Partner
1 0 1

I just ran into the same problem. The GraphQL Admin API shows three types of abandonments: checkouts, carts, and browses. But I can't find any way to query for IDs. The REST API has an endpoint for getting abandoned checkouts, but not browses or carts. Why even have a GraphQL query for abandonments if there's no way to use it? Does anyone have a way to find abandonment IDs?

troyha
Shopify Partner
3 0 9

Looking at exactly the same issue. I've been using Abandoned Checkouts for a while already but my users want Abandoned Carts and Conversion Rate (Abandoned Browse/Session data required). When I saw the Abandoned objects I thought "Great, this gives me all the data I need in one place", except it doesn't because of the same reasons already mentioned.

Is there a way to at least get the counts of this data?