abandonedCheckoutsCount
Requires access scope. Also: The user must have manage_abandoned_checkouts permission.
Returns the count of abandoned checkouts for the given shop. Limited to a maximum of 10000.
Arguments
- Anchor to limitlimit•
The upper bound on count value before returning a result.
- Anchor to queryquery•
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to default•string
Filter by a case-insensitive search of multiple fields in a document.
query=Bob Norman
query=title:green hoodie
- Anchor to created_at•time
The date and time (in ISO 8601 format) when the abandoned cart was created.
- Anchor to email_state•string
Filter by
value. Possible values:
sent
,,
scheduled
andsuppressed
.- Anchor to recovery_state•string
Possible values:
recovered
and.
- Anchor to status•string
Possible values:
open
andclosed
.- Anchor to updated_at•time
The date and time (in ISO 8601 format) when the abandoned cart was last updated.
Example:
- Anchor to savedSearchIdsaved•
Search Id
Anchor to Possible returnsPossible returns
- Anchor to CountCount•
Details for count of elements.
Retrieves a count of checkouts
query AbandonedCheckoutsCount {
abandonedCheckoutsCount(limit: 1000) {
count
precision
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "query AbandonedCheckoutsCount { abandonedCheckoutsCount(limit: 1000) { count precision } }"
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
query AbandonedCheckoutsCount {
abandonedCheckoutsCount(limit: 1000) {
count
precision
}
}`,
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: `query AbandonedCheckoutsCount {
abandonedCheckoutsCount(limit: 1000) {
count
precision
}
}`,
});
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
query AbandonedCheckoutsCount {
abandonedCheckoutsCount(limit: 1000) {
count
precision
}
}
QUERY
response = client.query(query: query)