For store owners, abandoned checkouts can help them understand which customers began a checkout but did not complete the purchase. With abandoned checkouts, they can send reminders or recovery emails to increase sales.

In this article, we are going to learn how to get abandoned checkouts in the Shopify Remix app.
Steps to Get Abandoned Checkout using GraphQL API in Shopify Remix App:
Add an API to get abandoned checkout
The abandoned checkout API will be called anywhere, like on the storefront or on the backend.
Here is a code sample for deleting a customer:
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
query AbandonedCheckouts {
abandonedCheckouts(first: 1) {
nodes {
abandonedCheckoutUrl
billingAddress {
country
}
completedAt
createdAt
customer {
firstName
lastName
email
}
id
shippingAddress {
country
}
updatedAt
}
}
}`,
);
const data = await response.json();
After successfully integrating this API, you can get abandoned checkout from the backend, and you can also call this as an API and get abandoned checkout from the frontend, too.

Conclusion:
Abandoned checkout is a very useful thing for store owners to get an incomplete checkout. You can add this feature to your code using this API. Make sure to also get multiple abandoned checkouts using the first or last parameter of the API.

FAQ
- What is an abandoned checkout in Shopify?
An abandoned checkout happens when a customer adds products to a cart, goes to the checkout page, but does not complete the purchase during the payment stage. Shopify automatically saves abandoned checkouts so that merchants can reach out to the customer in the future.
- What is GraphQL in Shopify?
GraphQL is a query language used by Shopify to efficiently interact with store data. Instead of making multiple rest calls, a single GraphQL allows you to specify the exact data you want to receive, increasing speed and performance.
- What are abandoned checkouts used for?
Abandoned checkouts are beneficial to store owners because they have customer data which tells them which customers left products in their carts without purchasing them. This data is also vital to any cart recovery campaign – and the data will help improve your conversion rates and increase your sales.