Leveraging Abandoned Checkout Data for WhatsApp Notifications

Topic summary

A developer is building a Node.js service that sends automated WhatsApp reminders to customers who abandon their Shopify carts. Their current approach retrieves all checkouts via the Shopify API and manually filters for abandoned ones, which is resource-intensive for high-volume stores.

Current Challenge:

  • Seeking a more efficient method to access abandoned checkout data directly
  • Uncertain about differences between checkout and abandonedCheckout endpoints
  • Want to leverage Shopify’s built-in “Abandoned checkout automation” feature through the API

Solution Provided:
A community member (PMike) recommends using the GET /admin/api/2021-07/checkouts.json endpoint with the status=abandoned query parameter to filter results directly. A Node.js code example using Axios is provided, showing how to:

  • Make authenticated requests with the Shopify access token
  • Retrieve only abandoned checkouts without manual filtering
  • Handle pagination for stores with large volumes

The discussion remains open for further questions, with the developer seeking to optimize their conversion rate improvement service.

Summarized with AI on November 20. AI used: claude-sonnet-4-5-20250929.

Hello Shopify Community,

We’re developing a service aimed at improving the user experience and conversion rates for Shopify stores. Our service sends automated WhatsApp messages to customers who have abandoned their carts, reminding them about the products they’ve left behind and providing a convenient way to complete their purchase.

The service is built on Node.js and uses the Shopify API to track checkouts. Currently, we’re using the checkout endpoint to retrieve all checkouts and then manually filtering to find the abandoned ones. This approach works, but it can be resource-intensive, especially for stores with a high volume of transactions.

We’re aware that Shopify provides an “Abandoned checkout automation” feature which can be enabled from the admin panel. We’re interested in leveraging this feature to more efficiently track abandoned checkouts. Specifically, we’re looking to access the data gathered by this feature through the API, which would allow us to directly retrieve a list of abandoned checkouts without having to filter through all checkouts.

We understand that the checkout and abandonedCheckout endpoints may handle data differently, with the latter potentially providing a more efficient way to retrieve abandoned checkouts. However, we’re unsure about the specifics of how to access and use the abandonedCheckout data in our Node.js application.

Could anyone provide guidance on how to retrieve abandoned checkout data directly from the API? Any insights or resources would be greatly appreciated. We’re excited to continue developing this service to help Shopify store owners improve their conversion rates and customer engagement.

Thank you, Akhil Thakur

To retrieve abandoned checkout data directly from the Shopify API, you can use the GET /admin/api/2021-07/checkouts.json endpoint. By default, this endpoint returns all checkouts, including both completed and abandoned ones.

To specifically fetch abandoned checkouts, you can add the status=abandoned query parameter to your request. This will filter the results to only include abandoned checkouts.

Here’s an example of how you can retrieve abandoned checkouts using Node.js:

const axios = require('axios');

const shopifyShop = 'your-shop.myshopify.com';
const accessToken = 'your-access-token';

async function fetchAbandonedCheckouts() {
try {
const response = await axios.get(`https://${shopifyShop}/admin/api/2021-07/checkouts.json?status=abandoned`, {
headers: {
'X-Shopify-Access-Token': accessToken,
},
});

const abandonedCheckouts = response.data.checkouts;
// Process the abandoned checkouts as needed
console.log(abandonedCheckouts);
} catch (error) {
console.error(error);
}
}

fetchAbandonedCheckouts();

Make sure to replace 'your-shop.myshopify.com' with your actual Shopify shop domain and 'your-access-token' with your generated API access token.

This code snippet uses the Axios library to make the HTTP request to the Shopify API. You can modify it based on your preferred HTTP client.

Remember to handle pagination if you have a large number of abandoned checkouts. The API response will include a Link header that provides pagination information.

I hope this helps you retrieve abandoned checkout data from the Shopify API for your service. If you have any further questions, feel free to ask!

1 Like