How to get list of Abandonments via GraphQL

How to get list of Abandonments via GraphQL

jfkScollar
Shopify Partner
19 0 2

I would like to use a GraphQL API call to retrieve a list of abandonments for the past 24 hours for a given merchant who installed our app. How would I do that?

 

Thanks,

 

John

Replies 3 (3)

PeterPan1708
Shopify Partner
5 0 0

Currently, Shopify GraphQL doesn't support querying a list of abandonments, you can use the Rest API for retrieves a list of abandoned checkouts
My dev team is using both Graphql and REST for our app.
Hope that helps!

jfkScollar
Shopify Partner
19 0 2

Hi @PeterPan1708,

Thank you for your response.

 

The GraphQL Admin API has listed the Abandonment object with abandonmentTypes browse, cart, & checkout for over a year now, yet no way to access or list these abandonments using the GraphQL API?!

Anyone from Shopify dev have a timeline on when access to the abandonment object will be released via the GraphQL API?

Thanks,

John

 

jfkScollar_0-1725979503252.png

 

Animesuge
Visitor
1 0 0

To get a list of Abandonments via GraphQL, you would typically define a query that retrieves relevant fields from an abandonment-related type. For example, if your API has a type like Abandonment, the query could look something like this:

Explanation:

  1. abandonments: The root field that retrieves a list of abandonment objects.
  2. id: The unique identifier of the abandonment.
  3. user: A nested object to retrieve details of the user related to the abandonment.
  4. date: The date of abandonment.
  5. status: The current status (e.g., active, resolved, etc.).

Ensure the API you're working with has the appropriate schema defined to support these fields. You can adjust the fields based on the structure of your GraphQL schema.

Visit: https://animesuges.mom/